clear
clear matrix
clear mata

set maxvar 32767
set matsize 11000

set seed 1234

*put in your path
cd  "/Users/d31713r/Dropbox (Personal)/Voter fraud 2020 study/Data/"

*requires installing cibar command and lean1 graph scheme
net describe cibar, from(http://fmwww.bc.edu/RePEc/bocode/c)
net install cibar.pkg

net describe gr0002, from(http://www.stata-journal.com/software/sj3-3)
net install gr0002.pkg

net describe vreverse, from(http://fmwww.bc.edu/RePEc/bocode/v)
net install vreverse.pkg

net sj 15-1 gr0059_1
net install gr0059_1.pkg

net describe st0085_2, from(http://www.stata-journal.com/software/sj14-2)
net install st0085_2.pkg, replace

*************
*2022 WAVE 1*
*************

***YG 2022 - W1 (W3 overall)***
**December 2022**

use "DART0053_OUTPUT_updated.dta"

rename condition_treat condition_treat_w1

***Outcome Vars - PRE-TREATMENT***
*How many seats won by fraud in 2020*/
tab Q42a_w3 
rename Q42a_w3 seats_won_fraud_2020_w3
label var seats_won_fraud_2020_w3 "Number of Seats Won b/c Fraud 2020 - W3 PRE"
codebook seats_won_fraud_2020_w3

*How many seats will be won by fraud in 2022*
tab Q22b_w3 
rename Q22b_w3 seats_won_fraud_2022_w3
label var seats_won_fraud_2022_w3 "Number of Seats Will be Won b/c Fraud 2022 - W3 PRE"
codebook seats_won_fraud_2022_w3

*Biden rightful winner: four-point scale from definitely the rightful winner (4) to definitely not the rightful winner (1).
tab Q36_w3
vreverse Q36_w3, gen(biden_rwin_w3)
label var biden_rwin_w3 "Biden Rightful Winner W3 - PRE"
codebook biden_rwin_w3
tab biden_rwin_w3

*2020*
*Confidence your vote counted as intended: four-point scale from very confident (4) to not at all confident (1).
tab Q33_w3
rename Q33_w3 conf_yrvote_w3
label var conf_yrvote_w3 "Confidence Your Vote Counted as Intended 2020 - W3 - PRE"
codebook conf_yrvote_w3

*Confidence votes locally counted as voters intended: four-point scale from very confident (4) to not at all confident (1).
tab Q32_w3
rename Q32_w3 conf_locvote_w3
label var conf_locvote_w3 "Confidence Votes Locally Counted as Intended 2020 - W3 - PRE"
codebook conf_locvote_w3

*Confidence votes state counted as voters intended: four-point scale from very confident (4) to not at all confident (1).
tab Q31_w3
rename Q31_w3 conf_stvote_w3
label var conf_stvote_w3 "Confidence Votes in State Counted as Intended 2020 - W3 - PRE"
codebook conf_stvote_w3

*Confidence votes nationwide counted as voters intended: four-point scale from very confident (4) to not at all confident (1).
tab Q30_w3
rename Q30_w3 conf_natlvote_w3
label var conf_natlvote_w3 "Confidence Votes Nationally Counted as Intended 2020 - W3 - PRE"
codebook conf_natlvote_w3

*Confidence in 2020 election scale: Mean of responses to four items (each measured 4=very confident to 1=not at all confident):
*-Your vote
*-Votes locally
*-Votes in your state
*-Votes nationwide
egen confidence_2020_w3=rowmean(conf_*)

*(All means will be calculated as the mean of answered items. We will verify that these items scale as a composite measure using principal components factor analysis. If they do not scale together, we will analyze them separately (as separate composite measures and/or individual outcome measures). If we analyze one or more composite measures, we will also report results separately for each dependent variable included in the composite measure(s) in the appendix. We may rescale scales to alternate ranges such as 0-1 for expositional reasons.)

factor conf_*, pcf

*2022*
*Confidence your vote will be counted as intended: four-point scale from very confident (4) to not at all confident (1).
tab Q22a_new1_w3
rename Q22a_new1_w3 conf_yrvote_2022_w3
label var conf_yrvote_2022_w3 "Confidence Your Vote Will Be Counted as Intended 2022 - W3 - PRE"
codebook conf_yrvote_2022_w3

*Confidence votes locally will be counted as voters intended: four-point scale from very confident (4) to not at all confident (1).
tab Q22a_new2_w3
rename Q22a_new2_w3 conf_locvote_2022_w3
label var conf_locvote_2022_w3 "Confidence Votes Locally Will Be Counted as Intended 2022 - W3 - PRE"
codebook conf_locvote_2022_w3

*Confidence votes statewide will be counted as voters intended: four-point scale from very confident (4) to not at all confident (1).
tab Q22a_new3_w3
rename Q22a_new3_w3 conf_stvote_2022_w3
label var conf_stvote_2022_w3 "Confidence Votes in State Will Be Counted as Intended 2022 - W3 - PRE"
codebook conf_stvote_2022_w3

*Confidence votes nationwide will be counted as voters intended: four-point scale from very confident (4) to not at all confident (1).
tab Q22a_new4_w3
rename Q22a_new4_w3 conf_natlvote_2022_w3
label var conf_natlvote_2022_w3 "Confidence Votes Nationally Counted as Intended 2022 - W3 - PRE"
codebook conf_natlvote_2022_w3

*Confidence in 2022 election scale: Mean of responses to four items (each measured 4=very confident to 1=not at all confident):
*-Your vote
*-Votes locally
*-Votes in your state
*-Votes nationwide
egen confidence_2022_w3=rowmean(conf_yrvote_2022_w3 conf_locvote_2022_w3 conf_stvote_2022_w3 conf_natlvote_2022_w3)

factor conf_yrvote_2022_w3 conf_locvote_2022_w3 conf_stvote_2022_w3 conf_natlvote_2022_w3, pcf

**Voter Fraud 2020 Beliefs Frequency Scale - 2022 w3
/*Voter fraud in 2020 beliefs Frequency scale: Mean of responses to six items (each measured 7=a million or more to 1=less than ten):
-Voting more than once in an election.
-Stealing or tampering with ballots.
-Pretending to be someone else when voting.
-People voting who are not U.S. citizens.
-Voting with an absentee ballot intended for another person.
-Officials preventing absentee voters from voting.*/

tab q42_1_w3
vreverse q42_1_w3, gen(vf_doublevoting_w3)
label var vf_doublevoting_w3 "2020 VF Frequency - Double Voting - W3 - PRE"
codebook vf_doublevoting_w3

tab q42_2_w3
vreverse q42_2_w3, gen(vf_stealballots_w3)
label var vf_stealballots_w3 "2020 VF Frequency - Stealing/Tampering Ballots - W3 - PRE"
codebook vf_stealballots_w3

tab q42_3_w3
vreverse q42_2_w3, gen(vf_voterimpers_w3)
label var vf_voterimpers_w3 "2020 VF Frequency - Voter Impersonation - W3 - PRE"
codebook vf_voterimpers_w3

tab q42_4_w3
vreverse q42_4_w3, gen(vf_noncitz_voting_w3)
label var vf_noncitz_voting_w3 "2020 VF Frequency - Non-Citizen Voting - W3 - PRE"
codebook vf_noncitz_voting_w3

tab q42_5_w3
vreverse q42_5_w3, gen(vf_abstfraud_w3)
label var vf_abstfraud_w3 "2020 VF Frequency - Absentee Ballot Fraud - W3 - PRE"
codebook vf_abstfraud_w3
	
tab q42_6_w3
vreverse q42_6_w3, gen(vf_offic_fraud_w3)
label var vf_offic_fraud_w3 "2020 VF Frequency - Officials Preventing Absentee Vote - W3 - PRE"
codebook vf_offic_fraud_w3

*Voter fraud in 2020 beliefs Frequency scale: Mean of responses to six items (each measured 7=a million or more to 1=less than ten):
*-Voting more than once in an election.
*-Stealing or tampering with ballots.
*-Pretending to be someone else when voting.
*-People voting who are not U.S. citizens.
*-Voting with an absentee ballot intended for another person.
*-Officials preventing absentee voters from voting.
egen fraud2020w3_pre=rowmean(vf_doublevoting_w3 vf_stealballots_w3 vf_voterimpers_w3 vf_noncitz_voting_w3 vf_abstfraud_w3 vf_offic_fraud_w3)
codebook fraud2020w3_pre

factor vf_doublevoting_w3 vf_stealballots_w3 vf_voterimpers_w3 vf_noncitz_voting_w3 vf_abstfraud_w3 vf_offic_fraud_w3, pcf


**POST-TREATMENT**

*Biden rightful winner: four-point scale from definitely the rightful winner (4) to definitely not the rightful winner (1).
tab Q36_post_w3
vreverse Q36_post_w3, gen(biden_rwin_w3_post)
label var biden_rwin_w3_post "Biden Rightful Winner W3 - POST"
codebook biden_rwin_w3_post

*How many seats won by fraud in 2020*/
tab Q42a_post_w3 
rename Q42a_post_w3 seats_won_fraud_2020_w3_post
label var seats_won_fraud_2020_w3_post "Number of Seats Won b/c Fraud 2020 - W3 POST"
codebook seats_won_fraud_2020_w3_post

*How many seats will be won by fraud in 2022*
tab Q42c_w3 
rename Q42c_w3 seats_won_fraud_2022_w3_post
label var seats_won_fraud_2022_w3_post "Number of Seats Will Be Won b/c Fraud 2022 - W3 POST"
codebook seats_won_fraud_2022_w3_post

*2020*
*Confidence your vote counted as intended: four-point scale from very confident (4) to not at all confident (1).
tab Q33_post_w3
rename Q33_post_w3 conf_yrvote_w3_post
label var conf_yrvote_w3_post "Confidence Your Vote Counted as Intended 2020 - W3 - POST"
codebook conf_yrvote_w3_post

*Confidence votes locally counted as voters intended: four-point scale from very confident (4) to not at all confident (1).
tab Q32_post_w3
rename Q32_post_w3 conf_locvote_w3_post
label var conf_locvote_w3_post "Confidence Votes Locally Counted as Intended 2020 - W3 - POST"
codebook conf_locvote_w3_post

*Confidence votes nationwide counted as voters intended: four-point scale from very confident (4) to not at all confident (1).
tab Q31_post_w3
rename Q31_post_w3 conf_stvote_w3_post
label var conf_stvote_w3_post "Confidence Votes in State Counted as Intended 2020 - W3 - POST"
codebook conf_stvote_w3_post

*Confidence votes nationwide counted as voters intended: four-point scale from very confident (4) to not at all confident (1).
tab Q30_post_w3
rename Q30_post_w3 conf_natlvote_w3_post
label var conf_natlvote_w3_post "Confidence Votes Nationally Counted as Intended 2020 - W3 - POST"
codebook conf_natlvote_w3_post

*Confidence in 2020 election scale: Mean of responses to four items (each measured 4=very confident to 1=not at all confident):
*-Your vote
*-Votes locally
*-Votes in your state
*-Votes nationwide
egen confidence_2020_w3_post=rowmean(conf_yrvote_w3_post conf_locvote_w3_post conf_stvote_w3_post conf_natlvote_w3_post)

factor conf_yrvote_w3_post conf_locvote_w3_post conf_stvote_w3_post conf_natlvote_w3_post, pcf

*2022*
*Confidence your vote will be counted as intended: four-point scale from very confident (4) to not at all confident (1).
tab Q42b_1new_w3
rename Q42b_1new_w3 conf_yrvote_2022_w3_post
label var conf_yrvote_2022_w3_post "Confidence Your Vote Will Be Counted as Intended 2022 - W3 - POST"
codebook conf_yrvote_2022_w3_post

*Confidence votes locally will be counted as voters intended: four-point scale from very confident (4) to not at all confident (1).
tab Q42b_2new_w3
rename Q42b_2new_w3 conf_locvote_2022_w3_post
label var conf_locvote_2022_w3_post "Confidence Votes Locally Will Be Counted as Intended 2022 - W3 - POST"
codebook conf_locvote_2022_w3_post

*Confidence votes statewide will be counted as voters intended: four-point scale from very confident (4) to not at all confident (1).
tab Q42b_3new_w3
rename Q42b_3new_w3 conf_stvote_2022_w3_post
label var conf_stvote_2022_w3_post "Confidence Votes in State Will Be Counted as Intended 2022 - W3 - POST"
codebook conf_stvote_2022_w3_post

*Confidence votes nationwide will be counted as voters intended: four-point scale from very confident (4) to not at all confident (1).
tab Q42b_4new_w3
rename Q42b_4new_w3 conf_natlvote_2022_w3_post
label var conf_natlvote_2022_w3_post "Confidence Votes Nationally Will Be Counted as Intended 2022 - W3 - POST"
codebook conf_natlvote_2022_w3_post

*Confidence in 2022 election scale: Mean of responses to four items (each measured 4=very confident to 1=not at all confident):
*-Your vote
*-Votes locally
*-Votes in your state
*-Votes nationwide
egen confidence_2022_w3_post=rowmean(conf_yrvote_2022_w3_post conf_locvote_2022_w3_post conf_stvote_2022_w3_post conf_natlvote_2022_w3_post)

factor conf_yrvote_2022_w3_post conf_locvote_2022_w3_post conf_stvote_2022_w3_post conf_natlvote_2022_w3_post, pcf

**Voter Fraud 2020 Beliefs Frequency Scale - 2022 w3
/*Voter fraud in 2020 beliefs Frequency scale: Mean of responses to six items (each measured 7=a million or more to 1=less than ten):
-Voting more than once in an election.
-Stealing or tampering with ballots.
-Pretending to be someone else when voting.
-People voting who are not U.S. citizens.
-Voting with an absentee ballot intended for another person.
-Officials preventing absentee voters from voting.*/
tab q42_1_post_w3
vreverse q42_1_post_w3, gen(vf_doublevoting_w3_post)
label var vf_doublevoting_w3_post "2020 VF Frequency - Double Voting - W3 - POST"
codebook vf_doublevoting_w3_post

tab q42_2_post_w3
vreverse q42_2_post_w3, gen(vf_stealballots_w3_post)
label var vf_stealballots_w3_post "2020 VF Frequency - Stealing/Tampering Ballots - W3 - POST"
codebook vf_stealballots_w3_post

tab q42_3_post_w3
vreverse q42_2_post_w3, gen(vf_voterimpers_w3_post)
label var vf_voterimpers_w3_post "2020 VF Frequency - Voter Impersonation - W3 - POST"
codebook vf_voterimpers_w3_post

tab q42_4_post_w3
vreverse q42_4_post_w3, gen(vf_noncitz_voting_w3_post)
label var vf_noncitz_voting_w3_post "2020 VF Frequency - Non-Citizen Voting - W3 - POST"
codebook vf_noncitz_voting_w3_post

tab q42_5_post_w3
vreverse q42_5_post_w3, gen(vf_abstfraud_w3_post)
label var vf_abstfraud_w3_post "2020 VF Frequency - Absentee Ballot Fraud - W3 - POST"
codebook vf_abstfraud_w3_post
	
tab q42_6_post_w3
vreverse q42_6_post_w3, gen(vf_offic_fraud_w3_post)
label var vf_offic_fraud_w3_post "2020 VF Frequency - Officials Preventing Absentee Vote - W3 - POST"
codebook vf_offic_fraud_w3_post

*Voter fraud in 2020 beliefs Frequency scale: Mean of responses to six items (each measured 7=a million or more to 1=less than ten):
*-Voting more than once in an election.
*-Stealing or tampering with ballots.
*-Pretending to be someone else when voting.
*-People voting who are not U.S. citizens.
*-Voting with an absentee ballot intended for another person.
*-Officials preventing absentee voters from voting.
egen fraud2020w3_post=rowmean(vf_doublevoting_w3_post vf_stealballots_w3_post vf_voterimpers_w3_post vf_noncitz_voting_w3_post vf_abstfraud_w3_post vf_offic_fraud_w3_post)
codebook fraud2020w3_post 

factor vf_doublevoting_w3_post vf_stealballots_w3_post vf_voterimpers_w3_post vf_noncitz_voting_w3_post vf_abstfraud_w3_post vf_offic_fraud_w3_post, pcf

***Predictors
** Inoculation Condition 
tab Q1_C1_w3 count_c1_q1, cell /*94% correct first time*/
tab Q2_C1_w3 count_c1_q2, cell /*94% correct first time*/
tab Q3_C1_w3 count_c1_q3, cell /*81% correct first time*/
tab Q4_C1_w3 count_c1_q4, cell /*87% correct first time*/

gen num_correct_first_inoc=(Q1_C1_w3==1 & count_c1_q1==1) + (Q2_C1_w3==1 & count_c1_q2==1) + (Q3_C1_w3==1 & count_c1_q3==1) + (Q4_C1_w3==1 & count_c1_q4==1) if condition_treat==1 
tab num_correct_first_inoc

gen inoculation=(condition_treat==1)
label var inoculation "Prebunking"
codebook inoculation

** Fact Check Condition
tab Q1_C2_w3 count_c2_q1, cell /*91% correct first time*/
tab Q2_C2_w3 count_c2_q2, cell /*89% correct first time*/
tab Q3_C2_w3 count_c2_q3, cell /*97% correct first time*/
tab Q4_C2_w3 count_c2_q4, cell /*80% correct first time*/

gen num_correct_first_corr=(Q1_C2_w3==1 & count_c2_q1==1) + (Q2_C2_w3==1 & count_c2_q2==1) + (Q3_C2_w3==1 & count_c2_q3==1) + (Q4_C2_w3==1 & count_c2_q4==1) if condition_treat==2
tab num_correct_first_corr

gen correction=(condition_treat==2)
label var correction "Correction"
codebook correction

** Placebo Condition
tab Q1_C3_w3 /*99.8%*/
tab Q2_C3_w3 /*99.7%*/
tab Q3_C3_w3 /*99*/
tab Q4_C3_w3 /*99.9%*/

**Democrat
*Democrat: 1 if respondent self-identifies as a Democrat or leans toward the Democratic Party, 0 if they do not lean toward either party, lean Republican, or self-identify as a Republican.
tab pid7
recode pid7 (1/3=1 "Democrat") (4/8=0 "Non-Democrat") (.=.), gen(democrat_w3)
label var democrat_w3 "Democrat Dummy"
codebook democrat_w3

**Republican 

*Republican: 1 if respondent self-identifies as a Republican or leans toward the Republican Party, 0 if they do not lean toward either party, lean Democrat, or self-identify as a Democrat.
recode pid7 (1/4 8 = 0 "Non-Republican") (5/7=1 "Republican") (.=.), gen(republican_w3)
label var republican_w3 "Republican Dummy"
codebook republican_w3

gen independent_w3=.
replace independent_w3=0 if pid7!=4 & pid7!=. & pid7!=8
replace independent_w3=1 if pid7==4 | pid7==8

*PID 3-Point

*Three-point party ID scale: Democrats including leaners (1), true independents (2), Republicans including leaners (3).
recode pid7 (1/3=1 "Democrats") (4=2 "Independents") (5/7=3 "Republicans") (8=.) (.=.), gen(pid3_recode_w3)
label var pid3_recode_w3 "PID 3-Pt (Recode from PID7)"
codebook pid3_recode_w3
***NOTE: above treats "Not sure" (pid7=8) as missing though treated as 0 for democrat/republican

** quietly lasso variables

*Education (college vs. non-college)
codebook educ
gen college_w3=(educ==5 | educ==6) if educ!=.
codebook college_w3

*Age group (18-34, 35-44, 45-54, 55-64, 65+)
codebook age
gen age1834=(age>=18 & age<=34)
gen age3544=(age>=35 & age<=44)
gen age4554=(age>=45 & age<=54)
gen age5564=(age>=55 & age<=64)
gen age65plus=(age>=65 & age!=.)
codebook age*

gen agegroup=.
replace agegroup=1 if age1834==1
replace agegroup=2 if age3544==1
replace agegroup=3 if age4554==1
replace agegroup=4 if age5564==1
replace agegroup=5 if age65plus==1

label def agelab 1 "18-34" 2 "35-44" 3 "45-54" 4 "55-64" 5 "65+"
label val agegroup agelab

*Male (1/0)
codebook gender
gen male=(gender==1) if gender!=.
codebook male

*Region (Northeast, South, Midwest, West)
codebook region
gen northeast=(region==1) if region!=.
gen midwest=(region==2) if region!=.
gen south=(region==3) if region!=.
gen west=(region==4) if region!=.

*Party ID (three-point)
*made above

*Ideological self-placement (seven-point) 
replace ideo5=. if ideo5==6 
rename ideo5 ideo5_w3
**DEVIATION: five-point not seven

*Conspiracy predispositions (mean: 1-5)
*Conspiracy predispositions: Mean of responses to 4 items (each measured 5=strongly agree to 1=strongly disagree):
*-"Much of our lives are being controlled by plots hatched in secret places."
*-"Even though we live in a democracy, a few people will always run things anyway."
*-"The people who really `run' the country are not known to voters."
*-"Big events like wars, recessions, and the outcomes of elections are controlled by small groups of people who are working in secret against the rest of us."
codebook q21_*
vreverse q21_1_w3, gen(conspiracy1)
vreverse q21_2_w3, gen(conspiracy2)
vreverse q21_3_w3, gen(conspiracy3)
vreverse q21_4_w3, gen(conspiracy4)
codebook conspir*
egen conspiracy=rowmean(conspiracy1-conspiracy4)
codebook conspiracy

*attention checks
gen attention1=(Q21c_6_w3==4 | Q21c_6_w3==5)
gen attention2=(Q21d_2_w3==4 | Q21d_2_w3==5)
tab attention1 attention2, cell /*89% passed both, 9% failed one, 3% failed both*/

gen pass_attention=(attention1==1 & attention2==1)

*Political knowledge: Number of correct responses to 5 items (0-5):
*-"For how many years is a United States Senator elected - that is, how many years are there in one full term of oﬃce for a U.S. Senator?" (response options: Two years, Four years, Six years, Eight years, None of these, Don't know)
*-"How many times can an individual be elected President of the United States under current laws?  [Response options: Once, Twice, Four times, Unlimited number of terms, Don't know]
*-"How many U.S. Senators are there from each state?" (response options: One, Two, Four, Depends on which state, Don't know)
*-"Who is currently the Prime Minister of the United Kingdom?" (response options: Richard Branson, Liz Truss, David Cameron, Theresa May, Margaret Thatcher, Don't know)
*-"For how many years is a member of the United States House of Representatives elected - that is, how many years are there in one full term of office for a U.S. House member?" (response options: Two years, Four years, Six years, Eight years, For life, Don't know)
codebook Q6_w3 Q7_w3 Q8_w3 Q9_w3x Q10_w3
gen knowledge=(Q6_w3==3)+(Q7_w3==2)+(Q8_w3==2)+(Q9_w3==1)+(Q10_w3==1)
codebook knowledge

*Nonwhite (1/0)
gen nonwhite_w3=(race!=1) if race!=.

*Interest in politics (1-5)
codebook Q3_w3 
vreverse Q3_w3, gen(polinterest)
codebook polinterest

*Media and information trust: Mean of responses to four items (each 1=not at all and 4=a lot) 
*How much, if at all, do you trust the information you get from …
*-National news organizations 
*-Local news organizations
*-Social media (such as Facebook, Twitter, and Instagram)
*-Political leaders in the federal government
*-Political leaders in the state government 
codebook q22*
vreverse q22_1_w3, gen(mediatrust1)
vreverse q22_2_w3, gen(mediatrust2)
vreverse q22_3_w3, gen(mediatrust3)
vreverse q22_4_w3, gen(mediatrust4)
vreverse q22_5_w3, gen(mediatrust5)
egen mediatrust=rowmean(mediatrust1-mediatrust5)
codebook mediatrust

*Biden rightful winner (1-4)
*made above

*Seats changed in 2020 (1-4)
*made above

*Seats changed in 2022 (1-4)
*made above

*Fraud prevalence 2020 (mean: 1-7)
*made above

*Confidence in 2020 election (mean: 1-4)
*made above

*Confidence in 2022 election (mean: 1-4)
*made above

*Feelings toward Joe Biden (0-100)
codebook q14_w3
gen bidentherm=q14_w3

*Feelings toward Donald Trump (0-100)
codebook q13_w3
gen trumptherm=q13_w3

*Feelings toward Democrats (0-100)
codebook q11_w3
gen demtherm=q11_w3

*Feelings toward Republicans (0-100)
codebook q12_w3
gen reptherm=q12_w3

*Feelings toward news media (0-100)
codebook q15_w3
gen mediatherm=q15_w3

*Feelings toward election officials (0-100)
codebook q16_w3
gen electionofficialtherm=q16_w3

*Feelings toward white people (0-100)
codebook q18_w3
gen whitetherm=q18_w3

*Feelings toward Black people (0-100)
codebook q17_w3
gen blacktherm=q17_w3

*college
gen college=(educ==5 | educ==6) if educ!=.
gen noncollege=(educ<5) if educ!=.

label def noncollegelab 0 "College degree" 1 "No college degree"
label val noncollege noncollegelab

*demos
tab educ
tab gender
tab pid7
tab race
su birthyr, detail

gen white=(race==1) if race!=.

label def nonwhitelab 0 "White" 1 "Non-white"
label val nonwhite_w3 nonwhitelab

gen party3=.
replace party3=1 if pid7<4
replace party3=2 if pid7==4 | pid7==8
replace party3=3 if pid7>4 & pid7<8

label def partylab 1 "Democrat" 2 "Independent" 3 "Republican"
label val party3 partylab

gen condition=0
replace condition=1 if correction==1
replace condition=2 if inoculation==1

gen female=abs(male-1)

label var agegroup "Age group"
label var noncollege "Education"
label var nonwhite_w3 "Race"
label var party3 "Party (with leaners)"

dtable i.gender i.agegroup i.noncollege, by(condition) export(study1-descriptives1.tex, replace) fvlabel

dtable i.nonwhite_w3 i.party3, by(condition) export(study1-descriptives2.tex, replace) fvlabel

*H1: Exposure to a correction treatment (compared to a placebo condition) will increase confidence in the 2020 election and reduce beliefs about the prevalence and effects of fraud (Frequency of voter fraud, the number of seats changed by fraud, and whether Joe Biden is the rightful winner) in the 2020 election.

*RQ1b: Will exposure to a inoculation treatment (compared to a placebo condition) increase confidence in the 2020 election and reduce beliefs about the prevalence and effects of fraud (Frequency of voter fraud, the number of seats changed by fraud, and whether Joe Biden is the rightful winner) in the 2020 election? 

*RQ3a: Is there a difference between the effects of the correction and inoculation treatment on confidence in the 2020 election or beliefs about the prevalence and effects of fraud (Frequency of voter fraud, the number of seats changed by fraud, and whether Joe Biden is the rightful winner) in the 2020 election?

*H1/RQ1b: Confidence in 2020 vote = B0 + B1*correction + B2*inoculation + quietly lasso controls
*RQ3a: B1-B2

quietly lasso linear confidence_2020_w3_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local confidence_2020_w3_pst_ctl=e(allvars_sel) 

reg confidence_2020_w3_post correction inoculation `confidence_2020_w3_pst_ctl', robust
est store conf20
est store conf20orig
lincom correction-inoculation

reg confidence_2020_w3_post correction inoculation, robust
est store conf20_noc

reg confidence_2020_w3_post correction inoculation confidence_2020_w3, robust
est store conf20_ldv

foreach var of varlist conf_yrvote_w3_post conf_locvote_w3_post conf_stvote_w3_post conf_natlvote_w3_post {
quietly lasso linear `var' college age3544 age4554 age5564 age65plus male midwest south west pid3_recode ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local ctl=e(allvars_sel) 
reg `var' correction inoculation `ctl', robust
est store `var't
}

estout *t using "conf20w3-by-dv.tex", label style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** 0.005) 
est drop *t

*H1/RQ1b: 2020 fraud prevalence = B0 + B1*correction + B2*inoculation + quietly lasso controls
*RQ3a: B1-B2
	
quietly lasso linear fraud2020w3_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local fraud2020pst_ctl=e(allvars_sel) 

reg fraud2020w3_post correction inoculation `fraud2020pst_ctl', robust
est store fraud20
est store fraud20orig
lincom correction-inoculation

reg fraud2020w3_post correction inoculation, robust
est store fraud20_noc

reg fraud2020w3_post correction inoculation fraud2020w3_pre, robust
est store fraud20_ldv

foreach var of varlist vf_doublevoting_w3_post vf_stealballots_w3_post vf_voterimpers_w3_post vf_noncitz_voting_w3_post vf_abstfraud_w3_post vf_offic_fraud_w3_post {
quietly lasso linear `var' college age3544 age4554 age5564 age65plus male midwest south west pid3_recode ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local ctl=e(allvars_sel) 
reg `var' correction inoculation `ctl', robust
est store `var't
}

estout *t using "fraud20w3-by-dv.tex", label keep(correction inoculation) style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** 0.005) 
est drop *t

*H1/RQ1b: Seats changed in 2020 = B0 + B1*correction + B2*inoculation + quietly lasso controls
*RQ3a: B1-B2

quietly lasso linear seats_won_fraud_2020_w3_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local seats_won_fraud_2020_w3_pst_ctl=e(allvars_sel) 

reg seats_won_fraud_2020_w3_post correction inoculation `seats_won_fraud_2020_w3_pst_ctl', robust
est store seats20
est store seats20orig
lincom correction-inoculation

reg seats_won_fraud_2020_w3_post correction inoculation, robust
est store seats20_noc

reg seats_won_fraud_2020_w3_post correction inoculation seats_won_fraud_2020_w3, robust
est store seats20_ldv

*H1/RQ1b: Biden rightful winner in 2020 = B0 + B1*correction + B2*inoculation + quietly lasso controls
*RQ3a: B1-B2

quietly lasso linear biden_rwin_w3_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local biden_rwin_w3_post_pst_ctl=e(allvars_sel) 

reg biden_rwin_w3_post correction inoculation `biden_rwin_w3_post_pst_ctl', robust
est store biden20
est store bidenw3orig
lincom correction-inoculation

reg biden_rwin_w3_post correction inoculation, robust
est store biden20_noc

reg biden_rwin_w3_post correction inoculation biden_rwin_w3, robust
est store biden20_ldv

reg biden_rwin_w3_post correction##i.biden_rwin_w3 inoculation##i.biden_rwin_w3 `biden_rwin_w3_post_pst_ctl', robust
lincom 1.correction-1.inoculation	
	
*H2: Exposure to an inoculation treatment (compared to a placebo condition) will increase confidence in the 2022 election and reduce beliefs about the prevalence and effects of fraud (Frequency of voter fraud, the number of seats changed by fraud) in the 2022 election.

*RQ1a: Will exposure to a correction treatment (compared to a placebo condition) increase confidence in the 2022 election and reduce beliefs about the prevalence and effects of fraud (Frequency of voter fraud, the number of seats changed by fraud) in the 2022 election?

*RQ3b: Is there a difference between the effects of the correction and inoculation treatment on confidence in the 2022 election or beliefs about the prevalence and effects of fraud (Frequency of voter fraud, the number of seats changed by fraud) in the 2022 election?

*H2/RQ1a: Confidence in 2022 vote = B0 + B1*correction + B2*inoculation + quietly lasso controls
*RQ3b: B1-B2 

quietly lasso linear confidence_2022_w3_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local confidence_2022_w3_pst_ctl=e(allvars_sel) 

reg confidence_2022_w3_post correction inoculation `confidence_2022_w3_pst_ctl', robust
est store conf22
est store conf22w3orig
lincom correction-inoculation

reg confidence_2022_w3_post correction inoculation, robust
est store conf22_noc

reg confidence_2022_w3_post correction inoculation confidence_2022_w3, robust
est store conf22_ldv
	
reg confidence_2022_w3_post correction##c.confidence_2022_w3 inoculation##c.confidence_2022_w3 `confidence_2022_w3_pst_ctl', robust

foreach var of varlist conf_yrvote_2022_w3_post conf_locvote_2022_w3_post conf_stvote_2022_w3_post conf_natlvote_2022_w3_post {
quietly lasso linear `var' college age3544 age4554 age5564 age65plus male midwest south west pid3_recode ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local ctl=e(allvars_sel) 
reg `var' correction inoculation `ctl', robust
est store `var't
}

estout *t using "conf22w3-by-dv.tex", label keep(correction inoculation) style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** 0.005) 
est drop *t

	
*H2/RQ1a: 2022 fraud prevalence = B0 + B1*correction + B2*inoculation + quietly lasso controls
*RQ3b: B1-B2 

*DEVIATION: no 2022 fraud scale

*H2/RQ1a: Seats changed in 2022 = B0 + B1*correction + B2*inoculation + quietly lasso controls
*RQ3b: B1-B2 

quietly lasso linear seats_won_fraud_2022_w3_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local seats_won_fraud_2022_w3_pst_ctl=e(allvars_sel) 

reg seats_won_fraud_2022_w3_post correction inoculation `seats_won_fraud_2022_w3_pst_ctl', robust
est store seats22
est store seats22w3orig
lincom correction-inoculation

reg seats_won_fraud_2022_w3_post correction inoculation, robust
est store seats22_noc

reg seats_won_fraud_2022_w3_post correction inoculation seats_won_fraud_2022_w3, robust
est store seats22_ldv

coefplot (biden20,rename(correction="biden20")) (conf20, rename(correction="conf20"))  (conf22, rename(correction="conf22")) (fraud20, rename(correction="fraud20")) (seats20, rename(correction="seats20")) (seats22, rename(correction="seats22")), keep(correction) grid(none) xline(0) scheme(lean1) xtitle("Treatment effect") coeflabel(biden20 = `" "Biden rightful" "winner in 2020" "' conf22  = `" "Confidence in" "2022 election" "' seats22 = `" "Seats won by" "fraud in 2022" "' conf20 = `" "Confidence in" "2020 election" "' fraud20 = `" "Fraud in" "2020 election" "' seats20 = `" "Seats won by" "fraud in 2020" "') legend(off) offset(0) xscale(r(-.25 .1)) xlabel(-.2 -.1 0 .1)
graph export "wave1-w1correction.pdf", replace
graph export "wave1-w1correction.png", replace

coefplot (biden20,rename(inoculation="biden20")) (conf20, rename(inoculation="conf20"))  (conf22, rename(inoculation="conf22")) (fraud20, rename(inoculation="fraud20")) (seats20, rename(inoculation="seats20")) (seats22, rename(inoculation="seats22")), keep(inoculation) grid(none) xline(0) scheme(lean1) xtitle("Treatment effect") coeflabel(biden20 = `" "Biden rightful" "winner in 2020" "' conf22  = `" "Confidence in" "2022 election" "' seats22 = `" "Seats won by" "fraud in 2022" "' conf20 = `" "Confidence in" "2020 election" "' fraud20 = `" "Fraud in" "2020 election" "' seats20 = `" "Seats won by" "fraud in 2020" "') legend(off) offset(0) xscale(r(-.25 .1)) xlabel(-.2 -.1 0 .1)
graph export "wave1-w1inoculation.pdf", replace
graph export "wave1-w1inoculation.png", replace

coefplot (biden20,drop(inoculation) rename(correction="biden20") offset(.1) msize(large) msymbol(Th)) (conf20, drop(inoculation) rename(correction="conf20") offset(.1) msize(large) msymbol(Th)) (conf22, drop(inoculation) rename(correction="conf22") offset(.1) msize(large) msymbol(Th)) (fraud20, drop(inoculation) rename(correction="fraud20") offset(.1) msize(large) msymbol(Th)) (seats20, drop(inoculation) rename(correction="seats20") offset(.1) msize(large) msymbol(Th)) (seats22, drop(inoculation) rename(correction="seats22") offset(.1) msize(large) msymbol(Th)) (biden20, drop(correction) rename(inoculation="biden20") offset(-.1) msize(large) msymbol(S)) (conf20, drop(correction) rename(inoculation="conf20") offset(-.1) msize(large) msymbol(S)) (conf22, drop(correction) rename(inoculation="conf22") offset(-.1) msize(large) msymbol(S)) (fraud20, drop(correction) rename(inoculation="fraud20") offset(-.1) msize(large) msymbol(S)) (seats20, drop(correction) rename(inoculation="seats20") offset(-.1) msize(large) msymbol(S)) (seats22, drop(correction) rename(inoculation="seats22") offset(-.1) msize(large) msymbol(S)), keep(correction inoculation) grid(none) xline(0) scheme(lean1) xtitle("Treatment effect") coeflabel(biden20 = `" "Biden rightful" "winner in 2020" "' conf22  = `" "Confidence in" "2022 election" "' seats22 = `" "Seats won by" "fraud in 2022" "' conf20 = `" "Confidence in" "2020 election" "' fraud20 = `" "Fraud in" "2020 election" "' seats20 = `" "Seats won by" "fraud in 2020" "') legend(lab(2 "Credible sources") lab(14 "Prebunking") order(2 14) pos(5) ring(0) region(lstyle(foregrond))) offset(0) xscale(r(-.2 .12)) xlabel(-.2 -.1 0 .1)
graph export "wave1-w1combined.pdf", replace
graph export "wave1-w1combined.png", replace

estout biden20 conf20 conf22 fraud20 seats20 seats22 using "wave3effects.tex", label keep(correction inoculation) style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** .005) 

estout biden20_noc conf20_noc conf22_noc fraud20_noc seats20_noc seats22_noc using "wave3effects_noc.tex", label keep(correction inoculation) style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** .005) 

estout biden20 biden20_noc conf20 conf20_noc conf22 conf22_noc fraud20 fraud20_noc seats20 seats20_noc seats22 seats22_noc using "wave3effects_both.tex", label keep(correction inoculation) style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** .005) 

estout biden20 biden20_ldv biden20_noc conf20 conf20_ldv conf20_noc conf22 conf22_ldv conf22_noc using "wave3effects_all1.tex", label keep(correction inoculation) style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** .005) 

estout fraud20 fraud20_ldv fraud20_noc seats20 seats20_ldv seats20_noc seats22 seats22_ldv seats22_noc using "wave3effects_all2.tex", label keep(correction inoculation) style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** .005) 

*coefplot (conf20orig, rename(correction=`" "Confidence in" "2020 election" "') offset(.1) msymbol(Oh)) (conf20w4orig, rename(correction=`" "Confidence in" "2020 election" "') offset(0) msymbol(D)) (conf22w3orig, rename(correction=`" "Confidence in" "2022 election" "') offset(.1) msymbol(Oh)) (conf22w4orig, rename(correction=`" "Confidence in" "2022 election" "') offset(0) msymbol(D)) (conf22pre, rename(correction=`" "Confidence in" "2022 election" "') offset(-.1) msymbol(Sh)) (fraud20orig, rename(correction=`" "Fraud in" "2020 election" "') offset(.1) msymbol(Oh)) (fraud20w4orig, rename(correction=`" "Fraud in" "2020 election" "') offset(0) msymbol(D)) (seats20orig, rename(correction=`" "Seats won by" "fraud in 2020" "') offset(.1) msymbol(Oh)) (seats20w4orig, rename(correction=`" "Seats won by" "fraud in 2020" "') offset(0) msymbol(D)) (seats22w3orig, rename(correction=`" "Seats won by" "fraud in 2022" "') offset(.1) msymbol(Oh)) (seats22w4orig, rename(correction=`" "Seats won by" "fraud in 2022" "') offset(0) msymbol(D)) (seats22pre, rename(correction=`" "Seats won by" "fraud in 2022" "') offset(-.1) msymbol(Sh)), keep(correction) grid(none) xline(0) scheme(lean1) xtitle("Treatment effect") coeflabel(conf20orig = "Wave 1" conf20w4 = "Wave 2" conf22w3 = "Wave 1" conf22w4 = "Wave 2" conf22w5 = "Wave 3" fraud20orig = "Wave 1" fraud20w4orig = "Wave 2" seats20w3 = "Wave 1" seats20w4 = "Wave 2" seats22w3 = "Wave 1" seats22w4 = "Wave 2" seats22w5 = "Wave 3") legend(lab(2 "Wave 1") lab(4 "Wave 2") lab(10 "Wave 3") order(2 4 10)) xscale(r(-.2 .1)) xlabel(-.2 -.1 0 .1)

*Finally, we will conduct exploratory analyses of potential heterogeneous treatment effects for the following moderators for the models used to test H1, RQ1b, RQ3a, H2, RQ1a, RQ3b: 
*-Party identification (indicators for Democrats including leaners and Republicans including leaners)
*-Trump feeling thermometer (0-100)
*-Pre-treatment measure of the outcome variable

*If results are consistent using a median/tercile split or indicators rather than a continuous scale, we may present the FORMER (typo, deviation) in the main text for ease of exposition and include the continuous scale results in an appendix. We will also use tercile indicators to test whether a linearity assumption holds for any interactions with continuous moderators per Hainmueller et al (2019) and replace any continuous interactions in our models with them if it does not. 

xtile trumpq=trumptherm, nq(3)

*forcing these into groups of 3
xtile conf2020q=confidence_2020_w3, nq(4)
xtile conf2022q=confidence_2022_w3, nq(4)

xtile fraud2020q_w3=fraud2020w3_pre, nq(3)

gen cond=1
replace cond=2 if correction==1
replace cond=3 if inoculation==1
label def condlab 1 "Placebo" 2 "Correction" 3 "Prebunking"
label val cond condlab

*Confidence in 2020 vote = B0 + B1*correction + B2*inoculation + B3*moderator + B4*correctionXmoderator + B5*inoculationXmoderator + quietly lasso controls

quietly lasso linear confidence_2020_w3_post college age3544 age4554 age5564 age65plus male midwest south west ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local confidence_2020_w3_pst_ctl=e(allvars_sel) 

reg confidence_2020_w3_post correction##independent##republican inoculation##independent##republican `confidence_2020_w3_pst_ctl', robust
est store conf20party

reg confidence_2020_w3_post correction##independent##republican inoculation##independent##republican confidence_2020_w3, robust
est store conf20party_ldv

reg confidence_2020_w3_post correction##independent##republican inoculation##independent##republican, robust
est store conf20party_noc

quietly lasso linear confidence_2020_w3_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local confidence_2020_w3_pst_ctl=e(allvars_sel) 

reg confidence_2020_w3_post correction##ib1.trumpq inoculation##ib1.trumpq `confidence_2020_w3_pst_ctl', robust
est store conf20trump

reg confidence_2020_w3_post correction##ib1.trumpq inoculation##ib1.trumpq confidence_2020_w3, robust
est store conf20trump_ldv

reg confidence_2020_w3_post correction##ib1.trumpq inoculation##ib1.trumpq, robust
est store conf20trump_noc

reg confidence_2020_w3_post correction##pass_attention inoculation##pass_attention `confidence_2020_w3_pst_ctl', robust
est store attmod1

quietly lasso linear confidence_2020_w3_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local confidence_2020_w3_pst_ctl=e(allvars_sel) 

reg confidence_2020_w3_post correction##ib3.conf2020q inoculation##ib3.conf2020q `confidence_2020_w3_pst_ctl', robust
est store conf20dv

reg confidence_2020_w3_post correction##ib3.conf2020q inoculation##ib3.conf2020q, robust
est store conf20dv_noc

label def conf20lab 1 "Low" 2 "Medium" 3 "High"
label val conf2020q conf20lab

cibar confidence_2020_w3_post, over1(cond) graphopts(scheme(lean1) legend(on) ytitle("") yscale(r(1 4)) xtitle("Confidence in 2020 vote count (mean)") ylabel(1 "Not at all confident (1)" 2 "Not very confident (2)" 3 "Somewhat confident (3)" 4 "Very confident (4)"))
graph export "conf20.pdf", replace

cibar confidence_2020_w3_post, over1(cond) over2(conf2020q) graphopts(scheme(lean1) legend(on) ytitle("") yscale(r(1 4)) xtitle("Confidence in 2020 vote count (mean)") ylabel(1 "Not at all confident (1)" 2 "Not very confident (2)" 3 "Somewhat confident (3)" 4 "Very confident (4)"))
graph export "conf20terc.pdf", replace

gen confidence_2020_w3_post_binary=(confidence_2020_w3_post>=2.5) if confidence_2020_w3_post!=.

cibar confidence_2020_w3_post_binary, over1(cond) over2(conf2020q) graphopts(scheme(lean1) legend(on) ytitle("") xtitle("Percentage confident in 2020 vote count") ylabel(0 "0%" .2 "20%" .4 "40%" .6 "60%" .8 "80%" 1 "100%"))
graph export "conf20tercbinary.pdf", replace

cibar confidence_2020_w3_post, over1(cond) over2(pid3_recode) graphopts(scheme(lean1) legend(on) ytitle("") xlab(,labsize(*.8)) yscale(r(1 4)) xtitle("Confidence in 2020 vote count (mean)") ylabel(1 "Not at all confident (1)" 2 "Not very confident (2)" 3 "Somewhat confident (3)" 4 "Very confident (4)"))
graph export "conf20pid3.pdf", replace

cibar confidence_2020_w3_post_binary, over1(cond) over2(pid3_recode) graphopts(scheme(lean1) legend(on) ytitle("") xlab(,labsize(*.8)) xtitle("Percentage confident in 2020 vote count") ylabel(0 "0%" .2 "20%" .4 "40%" .6 "60%" .8 "80%" 1 "100%"))
graph export "conf20pid3binary.pdf", replace

*2020 fraud prevalence = B0 + B1*correction + B2*inoculation + B3*moderator + B4*correctionXmoderator + B5*inoculationXmoderator + quietly lasso controls

quietly lasso linear fraud2020w3_post college age3544 age4554 age5564 age65plus male midwest south west ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local fraud2020pst_ctl=e(allvars_sel) 

reg fraud2020w3_post correction##independent##republican inoculation##independent##republican `fraud2020pst_ctl', robust
est store fraud20party

reg fraud2020w3_post correction##independent##republican inoculation##independent##republican fraud2020w3_pre, robust
est store fraud20party_ldv

reg fraud2020w3_post correction##independent##republican inoculation##independent##republican, robust
est store fraud20party_noc

quietly lasso linear fraud2020w3_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local fraud2020pst_ctl=e(allvars_sel) 

reg fraud2020w3_post correction##ib1.trumpq inoculation##ib1.trumpq `fraud2020pst_ctl', robust
est store fraud20trump

reg fraud2020w3_post correction##ib1.trumpq inoculation##ib1.trumpq fraud2020w3_pre, robust
est store fraud20trump_ldv

reg fraud2020w3_post correction##ib1.trumpq inoculation##ib1.trumpq, robust
est store fraud20trump_noc

quietly lasso linear fraud2020w3_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local fraud2020pst_ctl=e(allvars_sel) 

reg fraud2020w3_post correction##ib1.fraud2020q inoculation##ib1.fraud2020q `fraud2020pst_ctl', robust
est store fraud20dv

reg fraud2020w3_post correction##ib1.fraud2020q inoculation##ib1.fraud2020q, robust
est store fraud20dv_noc

label def fraud20lab 1 "Low" 2 "Medium" 3 "High"
label val fraud2020q fraud20lab

cibar fraud2020w3_post, over1(cond) graphopts(scheme(lean1) legend(on) ytitle("") yscale(r(1 4)) xtitle("Belief in 2020 fraud prevalence (mean)") ylabel(1 "Less than ten (1)" 2 "Less than a hundred (2)" 3 "Hundreds (3)" 4 "Thousands (4)" 5 "Tens of thousands (5)" 6 "Hundreds of thousands (6)" 7 "A million or more (7)"))
graph export "fraud20.pdf", replace

cibar fraud2020w3_post, over1(cond) over2(fraud2020q) graphopts(scheme(lean1) legend(on) ytitle("") yscale(r(1 4)) xtitle("Belief in 2020 fraud prevalence (mean)") ylabel(1 "Less than ten (1)" 2 "Less than a hundred (2)" 3 "Hundreds (3)" 4 "Thousands (4)" 5 "Tens of thousands (5)" 6 "Hundreds of thousands (6)" 7 "A million or more (7)"))
graph export "fraud20terc.pdf", replace

gen fraud2020w3post_binary=(fraud2020w3_post>4) if fraud2020w3_post!=.

cibar fraud2020w3post_binary, over1(cond) over2(fraud2020q) graphopts(scheme(lean1) legend(on) ytitle("") xtitle("Percentage believe widespread fraud") ylabel(0 "0%" .2 "20%" .4 "40%" .6 "60%" .8 "80%" 1 "100%"))
graph export "fraud20tercbinary.pdf", replace

cibar fraud2020w3_post, over1(cond) over2(pid3_recode) graphopts(scheme(lean1) legend(on) ytitle("") yscale(r(1 4)) xlab(,labsize(*.8)) xtitle("Belief in 2020 fraud prevalence (mean)") ylabel(1 "Less than ten (1)" 2 "Less than a hundred (2)" 3 "Hundreds (3)" 4 "Thousands (4)" 5 "Tens of thousands (5)" 6 "Hundreds of thousands (6)" 7 "A million or more (7)"))
graph export "fraud20pid3.pdf", replace

cibar fraud2020w3post_binary, over1(cond) over2(pid3_recode) graphopts(scheme(lean1) legend(on) ytitle("") xlab(,labsize(*.8)) xtitle("Percentage believe widespread fraud") ylabel(0 "0%" .2 "20%" .4 "40%" .6 "60%" .8 "80%" 1 "100%"))
graph export "fraud20pid3binary.pdf", replace

*Seats changed in 2020 = B0 + B1*correction + B2*inoculation + B3*moderator + B4*correctionXmoderator + B5*inoculationXmoderator + quietly lasso controls

gen seats_won_fraud_2020_w3_mod=seats_won_fraud_2020_w3
replace seats_won_fraud_2020_w3_mod=3 if seats_won_fraud_2020_w3_mod==4

quietly lasso linear seats_won_fraud_2020_w3_post college age3544 age4554 age5564 age65plus male midwest south west ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local seats_won_fraud_2020_w3_pst_ctl=e(allvars_sel) 

reg seats_won_fraud_2020_w3_post correction##independent##republican inoculation##independent##republican `seats_won_fraud_2020_w3_pst_ctl', robust
est store seats20party

reg seats_won_fraud_2020_w3_post correction##independent##republican inoculation##independent##republican seats_won_fraud_2020_w3, robust
est store seats20party_ldv

reg seats_won_fraud_2020_w3_post correction##independent##republican inoculation##independent##republican, robust
est store seats20party_noc

quietly lasso linear seats_won_fraud_2020_w3_post college age3544 age4554 age5564 age65plus male midwest south west ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local seats_won_fraud_2020_w3_pst_ctl=e(allvars_sel) 

reg seats_won_fraud_2020_w3_post correction##ib1.trumpq inoculation##ib1.trumpq `seats_won_fraud_2020_w3_pst_ctl', robust
est store seats20trump

reg seats_won_fraud_2020_w3_post correction##ib1.trumpq inoculation##ib1.trumpq seats_won_fraud_2020_w3, robust
est store seats20trump_ldv

reg seats_won_fraud_2020_w3_post correction##ib1.trumpq inoculation##ib1.trumpq, robust
est store seats20trump_noc

quietly lasso linear seats_won_fraud_2020_w3_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local seats_won_fraud_2020_w3_pst_ctl=e(allvars_sel) 

reg seats_won_fraud_2020_w3_post correction##ib1.seats_won_fraud_2020_w3_mod inoculation##ib1.seats_won_fraud_2020_w3_mod `seats_won_fraud_2020_w3_pst_ctl', robust
est store seats20dv

reg seats_won_fraud_2020_w3_post correction##ib1.seats_won_fraud_2020_w3_mod inoculation##ib1.seats_won_fraud_2020_w3_mod, robust
est store seats20dv_noc

*Biden rightful winner in 2020 = B0 + B1*correction + B2*inoculation + B3*moderator + B4*correctionXmoderator + B5*inoculationXmoderator + quietly lasso controls

gen biden_rwin_w3_mod=biden_rwin_w3
recode biden_rwin_w3_mod (1=1) (2=2) (3=2) (4=3)

quietly lasso linear biden_rwin_w3_post college age3544 age4554 age5564 age65plus male midwest south west ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local biden_rwin_w3_post_pst_ctl=e(allvars_sel) 

reg biden_rwin_w3_post correction##independent##republican inoculation##independent##republican `biden_rwin_w3_post_pst_ctl', robust
est store bidenparty

reg biden_rwin_w3_post correction##independent##republican inoculation##independent##republican  biden_rwin_w3, robust
est store bidenparty_ldv

reg biden_rwin_w3_post correction##independent##republican inoculation##independent##republican, robust
est store bidenparty_noc

quietly lasso linear biden_rwin_w3_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local biden_rwin_w3_post_pst_ctl=e(allvars_sel) 

reg biden_rwin_w3_post correction##ib1.trumpq inoculation##ib1.trumpq `biden_rwin_w3_post_pst_ctl', robust
est store bidentrump

reg biden_rwin_w3_post correction##ib1.trumpq inoculation##ib1.trumpq biden_rwin_w3, robust
est store bidentrump_ldv

reg biden_rwin_w3_post correction##ib1.trumpq inoculation##ib1.trumpq, robust
est store bidentrump_noc

quietly lasso linear biden_rwin_w3_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local biden_rwin_w3_post_pst_ctl=e(allvars_sel) 

reg biden_rwin_w3_post correction##ib3.biden_rwin_w3_mod inoculation##ib3.biden_rwin_w3_mod `biden_rwin_w3_post_pst_ctl', robust
est store bidendv

reg biden_rwin_w3_post correction##ib3.biden_rwin_w3_mod inoculation##ib3.biden_rwin_w3_mod, robust
est store bidendv_noc

*Confidence in 2022 vote = B0 + B1*correction + B2*inoculation + B3*moderator + B4*correctionXmoderator + B5*inoculationXmoderator + quietly lasso controls

quietly lasso linear confidence_2022_w3_post college age3544 age4554 age5564 age65plus male midwest south west ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local confidence_2022_w3_pst_ctl=e(allvars_sel) 

reg confidence_2022_w3_post correction##independent##republican inoculation##independent##republican `confidence_2022_w3_pst_ctl', robust
est store conf22party

reg confidence_2022_w3_post correction##independent##republican inoculation##independent##republican confidence_2022_w3, robust
est store conf22party_ldv

reg confidence_2022_w3_post correction##independent##republican inoculation##independent##republican, robust
est store conf22party_noc

reg confidence_2022_w3_post correction##pass_attention inoculation##pass_attention `confidence_2022_w3_pst_ctl', robust
est store attmod2
estout attmod1 attmod2 using "study1-attention-interactions.tex", label style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** .005) 

quietly lasso linear confidence_2022_w3_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local confidence_2022_w3_pst_ctl=e(allvars_sel) 

reg confidence_2022_w3_post correction##ib1.trumpq inoculation##ib1.trumpq `confidence_2022_w3_pst_ctl', robust
est store conf22trump

reg confidence_2022_w3_post correction##ib1.trumpq inoculation##ib1.trumpq confidence_2022_w3, robust
est store conf22trump_ldv

reg confidence_2022_w3_post correction##ib1.trumpq inoculation##ib1.trumpq, robust
est store conf22trump_noc

quietly lasso linear confidence_2022_w3_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local confidence_2022_w3_pst_ctl=e(allvars_sel) 

reg confidence_2022_w3_post correction##ib3.conf2022q inoculation##ib3.conf2022q `confidence_2022_w3_pst_ctl', robust
est store conf22dv

reg confidence_2022_w3_post correction##ib3.conf2022q inoculation##ib3.conf2022q, robust
est store conf22dv_noc

label def conf22lab 1 "Low" 2 "Medium" 3 "High"
label val conf2022q conf22lab

cibar confidence_2022_w3_post, over1(cond) graphopts(scheme(lean1) legend(on) ytitle("") yscale(r(1 4)) xtitle("Confidence in 2022 vote count (mean)") ylabel(1 "Not at all confident (1)" 2 "Not very confident (2)" 3 "Somewhat confident (3)" 4 "Very confident (4)"))
graph export "conf22.pdf", replace

cibar confidence_2022_w3_post, over1(cond) over2(conf2022q) graphopts(scheme(lean1) legend(on) ytitle("") yscale(r(1 4)) xtitle("Confidence in 2022 vote count (mean)") ylabel(1 "Not at all confident (1)" 2 "Not very confident (2)" 3 "Somewhat confident (3)" 4 "Very confident (4)"))
graph export "conf22terc.pdf", replace

gen confidence_2022_w3_post_binary=(confidence_2022_w3_post>=2.5) if confidence_2022_w3_post!=.

cibar confidence_2022_w3_post_binary, over1(cond) over2(conf2022q) graphopts(scheme(lean1) legend(on) ytitle("") xtitle("Percentage confident in 2022 vote count") ylabel(0 "0%" .2 "20%" .4 "40%" .6 "60%" .8 "80%" 1 "100%"))
graph export "conf22tercbinary.pdf", replace

cibar confidence_2022_w3_post, over1(cond) over2(pid3_recode) graphopts(scheme(lean1) legend(on) ytitle("") xlab(,labsize(*.8)) yscale(r(1 4)) xtitle("Confidence in 2022 vote count (mean)") ylabel(1 "Not at all confident (1)" 2 "Not very confident (2)" 3 "Somewhat confident (3)" 4 "Very confident (4)"))
graph export "conf22pid3.pdf", replace

cibar confidence_2022_w3_post_binary, over1(cond) over2(pid3_recode) graphopts(scheme(lean1) legend(on) ytitle("") xlab(,labsize(*.8)) xtitle("Percentage confident in 2022 vote count") ylabel(0 "0%" .2 "20%" .4 "40%" .6 "60%" .8 "80%" 1 "100%"))
graph export "conf22pid3binary.pdf", replace

tab biden_rwin_w3
tab confidence_2020_w3
tab confidence_2022_w3 
tab seats_won_fraud_2020_w3 
tab seats_won_fraud_2022_w3 
tab fraud2020w3_pre 

*2022 fraud prevalence = B0 + B1*correction + B2*inoculation + B3*moderator + B4*correctionXmoderator + B5*inoculationXmoderator + quietly lasso controls

*DEVIATION: no 2022 fraud scale

*Seats changed in 2022 = B0 + B1*correction + B2*inoculation + B3*moderator + B4*correctionXmoderator + B5*inoculationXmoderator + quietly lasso controls

gen seats_won_fraud_2022_w3_mod=seats_won_fraud_2022_w3
replace seats_won_fraud_2022_w3_mod=3 if seats_won_fraud_2022_w3_mod==4

quietly lasso linear seats_won_fraud_2022_w3_post college age3544 age4554 age5564 age65plus male midwest south west ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local seats_won_fraud_2022_w3_pst_ctl=e(allvars_sel) 

reg seats_won_fraud_2022_w3_post correction##independent##republican inoculation##independent##republican `seats_won_fraud_2022_w3_pst_ctl', robust
est store seats22party

reg seats_won_fraud_2022_w3_post correction##independent##republican inoculation##independent##republican seats_won_fraud_2022_w3, robust
est store seats22party_ldv

reg seats_won_fraud_2022_w3_post correction##independent##republican inoculation##independent##republican, robust
est store seats22party_noc

quietly lasso linear seats_won_fraud_2022_w3_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local seats_won_fraud_2022_w3_pst_ctl=e(allvars_sel) 

reg seats_won_fraud_2022_w3_post correction##ib1.trumpq inoculation##ib1.trumpq `seats_won_fraud_2022_w3_pst_ctl', robust
est store seats22trump

reg seats_won_fraud_2022_w3_post correction##ib1.trumpq inoculation##ib1.trumpq seats_won_fraud_2022_w3, robust
est store seats22trump_ldv

reg seats_won_fraud_2022_w3_post correction##ib1.trumpq inoculation##ib1.trumpq, robust
est store seats22trump_noc

quietly lasso linear seats_won_fraud_2022_w3_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local seats_won_fraud_2022_w3_pst_ctl=e(allvars_sel) 

reg seats_won_fraud_2022_w3_post correction##ib1.seats_won_fraud_2022_w3_mod inoculation##ib1.seats_won_fraud_2022_w3_mod `seats_won_fraud_2022_w3_pst_ctl', robust
est store seats22dv

reg seats_won_fraud_2022_w3_post correction##ib1.seats_won_fraud_2022_w3_mod inoculation##ib1.seats_won_fraud_2022_w3_mod, robust
est store seats22dv_noc

*moderator distributions w1
tab democrat republican
tab trumpq
tab conf2020q
tab fraud2020q_w3
tab biden_rwin_w3_mod
tab seats_won_fraud_2020_w3_mod
tab conf2022q
tab seats_won_fraud_2022_w3_mod

*output HTE tables

estout bidenparty conf20party conf22party fraud20party seats20party seats22party using "wave3HTEsparty.tex", label style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** .005)

estout bidenparty bidenparty_ldv bidenparty_noc conf20party conf20party_ldv conf20party_noc conf22party conf22party_ldv conf22party_noc using "wave3HTEsparty1a.tex", label style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** .005) 

estout fraud20party fraud20party_ldv fraud20party_noc seats20party seats20party_ldv seats20party_noc seats22party seats22party_ldv seats22party_noc using "wave3HTEsparty1b.tex", label style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** .005)

estout bidentrump conf20trump conf22trump fraud20trump seats20trump seats22trump using "wave3HTEstrump.tex", label style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** .005)

estout bidentrump bidentrump_ldv bidentrump_noc conf20trump conf20trump_ldv conf20trump_noc conf22trump conf22trump_ldv conf22trump_noc using "wave3HTEstrump1a.tex", label style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** .005) 

estout fraud20trump fraud20trump_ldv fraud20trump_noc seats20trump seats20trump_ldv seats20trump_noc seats22trump seats22trump_ldv seats22trump_noc using "wave3HTEstrump1b.tex", label style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** .005) 

estout bidendv conf20dv conf22dv fraud20dv seats20dv seats22dv using "wave3HTEsdv.tex", label style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** .005) 

estout bidendv bidendv_noc conf20dv conf20dv_noc conf22dv conf22dv_noc fraud20dv fraud20dv_noc seats20dv seats20dv_noc seats22dv seats22dv_noc using "wave3HTEsdv1.tex", label style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** .005) 

*reshape long, deviation to cluster by respondent

*combined graph
coefplot (conf20, keep(correction)) (conf20, keep(inoculation)), xline(0) scheme(lean1) xtitle("Treatment effect") 

*\ fraud20 \ seats20 \ conf22 \ seats22)
graph export "w1treats.pdf", replace
graph export "w1treats.png", replace

*RQ2a: Is there a difference in the effect of the correction treatment on confidence in the 2020 election and beliefs about the prevalence and effects of fraud (Frequency of voter fraud, the number of seats changed by fraud) in the 2020 election versus its effects on confidence in the 2022 election and beliefs about the prevalence and effects of fraud (Frequency of voter fraud, the number of seats changed by fraud) in the 2022 election?

*RQ2b: Is there a difference in the effect of the inoculation treatment on confidence in the 2020 election and beliefs about the prevalence and effects of fraud (Frequency of voter fraud, the number of seats changed by fraud) in the 2020 election versus its effects on confidence in the 2022 election and beliefs about the prevalence and effects of fraud (Frequency of voter fraud, the number of seats changed by fraud) in the 2022 election?

*RQ2a/RQ2b: Confidence in vote (pooled 2020 and 2022): B0 + B1*correction + B2*inoculation + B3*2022 + B4*correctionX2022 + B5*inoculationX2022 + quietly lasso controls

/*original model: 

quietly lasso linear confidence_2020_w3_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local confidence_2020_w3_pst_ctl=e(allvars_sel) 

reg confidence_2020_w3_post correction inoculation `confidence_2020_w3_pst_ctl', robust
est store conf20
est store conf20orig
lincom correction-inoculation
*/

quietly lasso linear confidence_2020_w3_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local confidence_2020_w3_pst_ctl=e(allvars_sel) 

reg confidence_2020_w3_post correction inoculation `confidence_2020_w3_pst_ctl', robust
reg confidence_2020_w3_post correction inoculation, robust

preserve
rename confidence_2020_w3_post conf1
rename confidence_2022_w3_post conf2

reshape long conf, i(caseid) j(dv)
gen y22=(dv==2)
label def y22lab 0 "2020 election" 1 "2022 election"
label val y22 y22lab

quietly lasso linear conf college age3544 age4554 age5564 age65plus male midwest south west pid3_recode ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local conf_ctl=e(allvars_sel) 

reg conf correction##y22 inoculation##y22 `conf_ctl', robust cluster(caseid)
est store conf2022

reg conf correction##y22 inoculation##y22 confidence_2020_w3 confidence_2022_w3, robust cluster(caseid)
est store conf2022_ldv

reg conf correction##y22 inoculation##y22, robust cluster(caseid)
est store conf2022_noc

cibar conf, over1(cond) over2(y22) graphopts(scheme(lean1) legend(on) ytitle("") xlab(,labsize(*.8)) yscale(r(1 4)) xtitle("Confidence in vote count") ylabel(1 "Not at all confident (1)" 2 "Not very confident (2)" 3 "Somewhat confident (3)" 4 "Very confident (4)"))
graph export "confyear.pdf", replace

restore

*RQ2a/RQ2b: Fraud prevalence (pooled 2020 and 2022): B0 + B1*correction + B2*inoculation + B3*2022 + B4*correctionX2022 + B5*inoculationX2022 + quietly lasso controls

*DEVIATION: no 2022 fraud scale

*RQ2a/RQ2b: Seats changed (pooled 2020 and 2022): B0 + B1*correction + B2*inoculation + B3*2022 + B4*correctionX2022 + B5*inoculationX2022 + quietly lasso controls

*Clarification: RQ2a/b are "pooled" in the sense that the data will be stacked (long form) with two observations per respondent - one with their 2020 outcome and one with their 2022 outcome. These analyses will be clustered by respondent (clustering was inadvertently omitted from Wave 1 preregistration; this is a deviation).

preserve
drop seats_won_fraud_2020_w3_mod seats_won_fraud_2022_w3_mod
rename seats_won_fraud_2020_w3_post seats1
rename seats_won_fraud_2022_w3_post seats2

reshape long seats, i(caseid) j(dv)
gen y22=(dv==2)

quietly lasso linear seats college age3544 age4554 age5564 age65plus male midwest south west pid3_recode ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020 seats_won_fraud_2022 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local seats_ctl=e(allvars_sel) 

reg seats correction##y22 inoculation##y22 `seats_ctl', robust cluster(caseid)
est store seats2022

reg seats correction##y22 inoculation##y22 seats_won_fraud_2020 seats_won_fraud_2022, robust cluster(caseid)
est store seats2022_ldv

reg seats correction##y22 inoculation##y22, robust cluster(caseid)
est store seats2022_noc

estout conf2022 seats2022 using "yeardiffs2022w1", label keep(1.corr* 1.inoc* 1.y2*) style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** 0.005)

estout conf2022 conf2022_ldv conf2022_noc seats2022 seats2022_ldv seats2022_noc using "yeardiffs2022w1-all", label keep(1.corr* 1.inoc* 1.y2*) style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** 0.005)

restore

*mean confidence

mean confidence_2020_w3_post if correction==0 & inoculation==0
mean confidence_2022_w3_post if correction==0 & inoculation==0

*substantive effects

bysort correction inoculation: tab biden_rwin_w3_post
bysort correction inoculation: tab confidence_2020_w3_post
bysort correction inoculation: tab confidence_2022_w3_post

gen binary_rightful_pre=(biden_rwin_w3>2 & biden_rwin_w3!=.)
gen binary_rightful=(biden_rwin_w3_post>2 & biden_rwin_w3_post!=.)
gen binary_confidence_2020_w3_post=(confidence_2020_w3_post>2.5 & confidence_2020_w3_post!=.)
gen binary_confidence_2022_w3_post=(confidence_2022_w3_post>2.5 & confidence_2022_w3_post!=.)

bysort correction inoculation: tab binary_rightful
bysort correction inoculation: tab binary_confidence_2020_w3_post
bysort correction inoculation: tab binary_confidence_2022_w3_post

gen gop=(party==3)

bysort gop correction inoculation: tab binary_rightful
bysort gop correction inoculation: tab binary_confidence_2020_w3_post
bysort gop correction inoculation: tab binary_confidence_2022_w3_post

foreach var of varlist biden_rwin_w3_post confidence_2020_w3_post confidence_2022_w3_post {
	gen floor_`var'=floor(`var')
}

bysort correction inoculation: tab biden_rwin_w3_post if gop==1
bysort correction inoculation: tab confidence_2020_w3_post if gop==1
bysort correction inoculation: tab confidence_2022_w3_post if gop==1

bysort correction inoculation: tab floor_biden_rwin_w3_post if gop==1
bysort correction inoculation: tab floor_confidence_2020_w3_post if gop==1
bysort correction inoculation: tab floor_confidence_2022_w3_post if gop==1

bysort gop correction inoculation: su biden_rwin_w3_post
bysort gop correction inoculation: su confidence_2020_w3_post
bysort gop correction inoculation: su confidence_2022_w3_post

bysort binary_rightful_pre correction inoculation: su binary_rightful

save "2022w1.dta", replace

*************
*2022 WAVE 2*
*************

***YG 2022 - W2 (W4 overall)***
**January 2023**

clear

use "DART0053_W2_OUTPUT.dta"

***Outcome Vars - PRE-TREATMENT***
*How many seats won by fraud in 2020*/
tab Q42a_w4 
rename Q42a_w4 seats_won_fraud_2020_w4
label var seats_won_fraud_2020_w4 "Number of Seats Won b/c Fraud 2020 - W4 PRE"
codebook seats_won_fraud_2020_w4

*How many seats will be won by fraud in 2022*
tab Q22b_w4 
rename Q22b_w4 seats_won_fraud_2022_w4
label var seats_won_fraud_2022_w4 "Number of Seats Will be Won b/c Fraud 2022 - W4 PRE"
codebook seats_won_fraud_2022_w4

*Biden rightful winner: four-point scale from definitely the rightful winner (4) to definitely not the rightful winner (1).
tab Q36_w4
vreverse Q36_w4, gen(biden_rwin_w4)
label var biden_rwin_w4 "Biden Rightful Winner W4 - PRE"
codebook biden_rwin_w4

*2020*
*Confidence your vote counted as intended: four-point scale from very confident (4) to not at all confident (1).
tab Q33_w4
rename Q33_w4 conf_yrvote_w4
label var conf_yrvote_w4 "Confidence Your Vote Counted as Intended 2020 - w4 - PRE"
codebook conf_yrvote_w4

*Confidence votes locally counted as voters intended: four-point scale from very confident (4) to not at all confident (1).
tab Q32_w4
rename Q32_w4 conf_locvote_w4
label var conf_locvote_w4 "Confidence Votes Locally Counted as Intended 2020 - w4 - PRE"
codebook conf_locvote_w4

*Confidence votes state counted as voters intended: four-point scale from very confident (4) to not at all confident (1).
tab Q31_w4
rename Q31_w4 conf_stvote_w4
label var conf_stvote_w4 "Confidence Votes in State Counted as Intended 2020 - w4 - PRE"
codebook conf_stvote_w4

*Confidence votes nationwide counted as voters intended: four-point scale from very confident (4) to not at all confident (1).
tab Q30_w4
rename Q30_w4 conf_natlvote_w4
label var conf_natlvote_w4 "Confidence Votes Nationally Counted as Intended 2020 - w4 - PRE"
codebook conf_natlvote_w4

*Confidence in 2020 election scale: Mean of responses to four items (each measured 4=very confident to 1=not at all confident):
*-Your vote
*-Votes locally
*-Votes in your state
*-Votes nationwide
egen confidence_2020_w4=rowmean(conf_*)

*(All means will be calculated as the mean of answered items. We will verify that these items scale as a composite measure using principal components factor analysis. If they do not scale together, we will analyze them separately (as separate composite measures and/or individual outcome measures). If we analyze one or more composite measures, we will also report results separately for each dependent variable included in the composite measure(s) in the appendix. We may rescale scales to alternate ranges such as 0-1 for expositional reasons.)

factor conf_*, pcf

*2022*
*Confidence your vote will be counted as intended: four-point scale from very confident (4) to not at all confident (1).
tab Q22a_1_w4
rename Q22a_1_w4 conf_yrvote_2022_w4
label var conf_yrvote_2022_w4 "Confidence Your Vote Will Be Counted as Intended 2022 - w4 - PRE"
codebook conf_yrvote_2022_w4

*Confidence votes locally will be counted as voters intended: four-point scale from very confident (4) to not at all confident (1).
tab Q22a_2_w4
rename Q22a_2_w4 conf_locvote_2022_w4
label var conf_locvote_2022_w4 "Confidence Votes Locally Will Be Counted as Intended 2022 - w4 - PRE"
codebook conf_locvote_2022_w4

*Confidence votes statewide will be counted as voters intended: four-point scale from very confident (4) to not at all confident (1).
tab Q22a_3_w4
rename Q22a_3_w4 conf_stvote_2022_w4
label var conf_stvote_2022_w4 "Confidence Votes in State Will Be Counted as Intended 2022 - w4 - PRE"
codebook conf_stvote_2022_w4

*Confidence votes nationwide will be counted as voters intended: four-point scale from very confident (4) to not at all confident (1).
tab Q22a_4_w4
rename Q22a_4_w4 conf_natlvote_2022_w4
label var conf_natlvote_2022_w4 "Confidence Votes Nationally Counted as Intended 2022 - w4 - PRE"
codebook conf_natlvote_2022_w4

*Confidence in 2022 election scale: Mean of responses to four items (each measured 4=very confident to 1=not at all confident):
*-Your vote
*-Votes locally
*-Votes in your state
*-Votes nationwide
egen confidence_2022_w4=rowmean(conf_yrvote_2022_w4 conf_locvote_2022_w4 conf_stvote_2022_w4 conf_natlvote_2022_w4)

factor conf_yrvote_2022_w4 conf_locvote_2022_w4 conf_stvote_2022_w4 conf_natlvote_2022_w4, pcf

**Voter Fraud 2020 Beliefs Frequency Scale - 2022 w4
/*Voter fraud in 2020 beliefs Frequency scale: Mean of responses to six items (each measured 7=a million or more to 1=less than ten):
-Voting more than once in an election.
-Stealing or tampering with ballots.
-Pretending to be someone else when voting.
-People voting who are not U.S. citizens.
-Voting with an absentee ballot intended for another person.
-Officials preventing absentee voters from voting.*/

tab Q42_1_w4
vreverse Q42_1_w4, gen(vf_doublevoting_w4)
label var vf_doublevoting_w4 "2020 VF Frequency - Double Voting - w4 - PRE"
codebook vf_doublevoting_w4

tab Q42_2_w4
vreverse Q42_2_w4, gen(vf_stealballots_w4)
label var vf_stealballots_w4 "2020 VF Frequency - Stealing/Tampering Ballots - w4 - PRE"
codebook vf_stealballots_w4

tab Q42_3_w4
vreverse Q42_2_w4, gen(vf_voterimpers_w4)
label var vf_voterimpers_w4 "2020 VF Frequency - Voter Impersonation - w4 - PRE"
codebook vf_voterimpers_w4

tab Q42_4_w4
vreverse Q42_4_w4, gen(vf_noncitz_voting_w4)
label var vf_noncitz_voting_w4 "2020 VF Frequency - Non-Citizen Voting - w4 - PRE"
codebook vf_noncitz_voting_w4

tab Q42_5_w4
vreverse Q42_5_w4, gen(vf_abstfraud_w4)
label var vf_abstfraud_w4 "2020 VF Frequency - Absentee Ballot Fraud - w4 - PRE"
codebook vf_abstfraud_w4
	
tab Q42_6_w4
vreverse Q42_6_w4, gen(vf_offic_fraud_w4)
label var vf_offic_fraud_w4 "2020 VF Frequency - Officials Preventing Absentee Vote - w4 - PRE"
codebook vf_offic_fraud_w4

*Voter fraud in 2020 beliefs Frequency scale: Mean of responses to six items (each measured 7=a million or more to 1=less than ten):
*-Voting more than once in an election.
*-Stealing or tampering with ballots.
*-Pretending to be someone else when voting.
*-People voting who are not U.S. citizens.
*-Voting with an absentee ballot intended for another person.
*-Officials preventing absentee voters from voting.
egen fraud2020w4_pre=rowmean(vf_doublevoting_w4 vf_stealballots_w4 vf_voterimpers_w4 vf_noncitz_voting_w4 vf_abstfraud_w4 vf_offic_fraud_w4)
codebook fraud2020w4_pre

factor vf_doublevoting_w4 vf_stealballots_w4 vf_voterimpers_w4 vf_noncitz_voting_w4 vf_abstfraud_w4 vf_offic_fraud_w4, pcf

**POST-TREATMENT**

*Biden rightful winner: four-point scale from definitely the rightful winner (4) to definitely not the rightful winner (1).
tab Q36_post_w4
vreverse Q36_post_w4, gen(biden_rwin_w4_post)
label var biden_rwin_w4_post "Biden Rightful Winner w4 - POST"
codebook biden_rwin_w4_post

*How many seats won by fraud in 2020*/
tab Q42a_post_w4 
rename Q42a_post_w4 seats_won_fraud_2020_w4_post
label var seats_won_fraud_2020_w4_post "Number of Seats Won b/c Fraud 2020 - POST"
codebook seats_won_fraud_2020_w4_post

*How many seats will be won by fraud in 2022*
tab Q42c_w4 
rename Q42c_w4 seats_won_fraud_2022_w4_post
label var seats_won_fraud_2022_w4_post "Number of Seats Will Be Won b/c Fraud 2022 - POST"
codebook seats_won_fraud_2022_w4_post

*2020*
*Confidence your vote counted as intended: four-point scale from very confident (4) to not at all confident (1).
tab Q33_post_w4
rename Q33_post_w4 conf_yrvote_w4_post
label var conf_yrvote_w4_post "Confidence Your Vote Counted as Intended 2020 - w4 - POST"
codebook conf_yrvote_w4_post

*Confidence votes locally counted as voters intended: four-point scale from very confident (4) to not at all confident (1).
tab Q32_post_w4
rename Q32_post_w4 conf_locvote_w4_post
label var conf_locvote_w4_post "Confidence Votes Locally Counted as Intended 2020 - w4 - POST"
codebook conf_locvote_w4_post

*Confidence votes nationwide counted as voters intended: four-point scale from very confident (4) to not at all confident (1).
tab Q31_post_w4
rename Q31_post_w4 conf_stvote_w4_post
label var conf_stvote_w4_post "Confidence Votes in State Counted as Intended 2020 - w4 - POST"
codebook conf_stvote_w4_post

*Confidence votes nationwide counted as voters intended: four-point scale from very confident (4) to not at all confident (1).
tab Q30_post_w4
rename Q30_post_w4 conf_natlvote_w4_post
label var conf_natlvote_w4_post "Confidence Votes Nationally Counted as Intended 2020 - w4 - POST"
codebook conf_natlvote_w4_post

*Confidence in 2020 election scale: Mean of responses to four items (each measured 4=very confident to 1=not at all confident):
*-Your vote
*-Votes locally
*-Votes in your state
*-Votes nationwide
egen confidence_2020_w4_post=rowmean(conf_yrvote_w4_post conf_locvote_w4_post conf_stvote_w4_post conf_natlvote_w4_post)

factor conf_yrvote_w4_post conf_locvote_w4_post conf_stvote_w4_post conf_natlvote_w4_post, pcf

*2022*
*Confidence your vote will be counted as intended: four-point scale from very confident (4) to not at all confident (1).
tab Q42b_1_w4
rename Q42b_1_w4 conf_yrvote_2022_w4_post
label var conf_yrvote_2022_w4_post "Confidence Your Vote Will Be Counted as Intended 2022 - w4 - POST"
codebook conf_yrvote_2022_w4_post

*Confidence votes locally will be counted as voters intended: four-point scale from very confident (4) to not at all confident (1).
tab Q42b_2_w4
rename Q42b_2_w4 conf_locvote_2022_w4_post
label var conf_locvote_2022_w4_post "Confidence Votes Locally Will Be Counted as Intended 2022 - w4 - POST"
codebook conf_locvote_2022_w4_post

*Confidence votes statewide will be counted as voters intended: four-point scale from very confident (4) to not at all confident (1).
tab Q42b_3_w4
rename Q42b_3_w4 conf_stvote_2022_w4_post
label var conf_stvote_2022_w4_post "Confidence Votes in State Will Be Counted as Intended 2022 - w4 - POST"
codebook conf_stvote_2022_w4_post

*Confidence votes nationwide will be counted as voters intended: four-point scale from very confident (4) to not at all confident (1).
tab Q42b_4_w4
rename Q42b_4_w4 conf_natlvote_2022_w4_post
label var conf_natlvote_2022_w4_post "Confidence Votes Nationally Will Be Counted as Intended 2022 - w4 - POST"
codebook conf_natlvote_2022_w4_post

*Confidence in 2022 election scale: Mean of responses to four items (each measured 4=very confident to 1=not at all confident):
*-Your vote
*-Votes locally
*-Votes in your state
*-Votes nationwide
egen confidence_2022_w4_post=rowmean(conf_yrvote_2022_w4_post conf_locvote_2022_w4_post conf_stvote_2022_w4_post conf_natlvote_2022_w4_post)

factor conf_yrvote_2022_w4_post conf_locvote_2022_w4_post conf_stvote_2022_w4_post conf_natlvote_2022_w4_post, pcf

**Voter Fraud 2020 Beliefs Frequency Scale - 2022 w4
/*Voter fraud in 2020 beliefs Frequency scale: Mean of responses to six items (each measured 7=a million or more to 1=less than ten):
-Voting more than once in an election.
-Stealing or tampering with ballots.
-Pretending to be someone else when voting.
-People voting who are not U.S. citizens.
-Voting with an absentee ballot intended for another person.
-Officials preventing absentee voters from voting.*/
tab Q42_1_post_w4
vreverse Q42_1_post_w4, gen(vf_doublevoting_w4_post)
label var vf_doublevoting_w4_post "2020 VF Frequency - Double Voting - w4 - POST"
codebook vf_doublevoting_w4_post

tab Q42_2_post_w4
vreverse Q42_2_post_w4, gen(vf_stealballots_w4_post)
label var vf_stealballots_w4_post "2020 VF Frequency - Stealing/Tampering Ballots - w4 - POST"
codebook vf_stealballots_w4_post

tab Q42_3_post_w4
vreverse Q42_2_post_w4, gen(vf_voterimpers_w4_post)
label var vf_voterimpers_w4_post "2020 VF Frequency - Voter Impersonation - w4 - POST"
codebook vf_voterimpers_w4_post

tab Q42_4_post_w4
vreverse Q42_4_post_w4, gen(vf_noncitz_voting_w4_post)
label var vf_noncitz_voting_w4_post "2020 VF Frequency - Non-Citizen Voting - w4 - POST"
codebook vf_noncitz_voting_w4_post

tab Q42_5_post_w4
vreverse Q42_5_post_w4, gen(vf_abstfraud_w4_post)
label var vf_abstfraud_w4_post "2020 VF Frequency - Absentee Ballot Fraud - w4 - POST"
codebook vf_abstfraud_w4_post
	
tab Q42_6_post_w4
vreverse Q42_6_post_w4, gen(vf_offic_fraud_w4_post)
label var vf_offic_fraud_w4_post "2020 VF Frequency - Officials Preventing Absentee Vote - w4 - POST"
codebook vf_offic_fraud_w4_post

*Voter fraud in 2020 beliefs Frequency scale: Mean of responses to six items (each measured 7=a million or more to 1=less than ten):
*-Voting more than once in an election.
*-Stealing or tampering with ballots.
*-Pretending to be someone else when voting.
*-People voting who are not U.S. citizens.
*-Voting with an absentee ballot intended for another person.
*-Officials preventing absentee voters from voting.
egen fraud2020w4_post=rowmean(vf_doublevoting_w4_post vf_stealballots_w4_post vf_voterimpers_w4_post vf_noncitz_voting_w4_post vf_abstfraud_w4_post vf_offic_fraud_w4_post)
codebook fraud2020w4_post 

factor vf_doublevoting_w4_post vf_stealballots_w4_post vf_voterimpers_w4_post vf_noncitz_voting_w4_post vf_abstfraud_w4_post vf_offic_fraud_w4_post, pcf

***Arizona/Maricopa county questions

*pre-experiment AZ awareness

*To the best of your knowledge, which of these states has had a losing candidate for governor refuse to accept the results of the 2022 election?
codebook Q22a_5_w4
recode Q22a_5_w4 (1=1 "Correct (Arizona)") (2/6=0 "Not Correct"), gen(azgovelect_knowl)
label var azgovelect_knowl "AZ Gov Election Knowledge"
codebook azgovelect_knowl
tab azgovelect_knowl /*76%*/

/* Arizona votes counted as intended */
*"How confident are you that votes in Arizona have been counted as voters intended in the November 2022 election?" (Recoded so higher values are more confident)
gen AZconfidence_w4=Q43_w4
recode AZconfidence (4=1) (3=2) (2=3) (1=4)

/* Maricopa County

On Election Day, a printing malfunction took place at about one-quarter of the polling places in Maricopa County, the most populous county in Arizona. This problem stopped some ballots from being counted onsite.
 
Please indicate whether you believe the following statement is accurate or not.
Only voting sites in conservative areas in Arizona's Maricopa County experienced issues with tabulating ballots on Election Day. */

*Statement/answer categories are worded such that saying "accurate" is a misperception, so coding is flipped so that the a fact-checking intervention that works would be negative (it reduces misperceptions) to avoid weird conflation of accuracy of underlying claim with "accurate" in answer categories 

gen AZmaricopa_w4=Q44_w4
recode AZmaricopa_w4 (4=1) (3=2) (2=3) (1=4)

/* Katie Hobbs won due to fraud */

*In the election for Arizona governor, Katie Hobbs, the Democrat, defeated Kari Lake, the Republican, due to election fraud and is NOT the rightful winner.

*Statement/answer categories are worded such that saying "agree" is a misperception, so coding is flipped so that the a fact-checking intervention that works would be negative (it reduces misperceptions) to be avoid switching signs from previous question 

gen AZgov_rightful_w4=Q45_w4
recode AZgov_rightful_w4 (4=1) (3=2) (2=3) (1=4)

/* Evaluations of Congressional races (ultimately need to reshape "wide" to "long" using state, district, party, and winner variables) *?
   0=Rightful winner
   1=Won due to voter fraud */

gen house_trial1=Q49_a_w4-1
gen house_trial2=Q49_b_w4-1 
gen house_trial3=Q49_c_w4-1
gen house_trial4=Q49_d_w4-1
gen house_trial5=Q49_e_w4-1 
gen house_trial6=Q49_f_w4-1

***Predictors

** Factcheck Condition 
tab count_Q23_fact_check_w4_pg if fact_check_treat==1 /*89.3% correct first time*/
tab fail_Q23_fact_check_w4_3times if fact_check_treat==1 /*1.0% fail 3x*/
tab Q23_fact_check_w4 /*see above*/

gen factcheck_w4=(fact_check_treat==1)
label var factcheck_w4 "Factcheck Treatment Dummy"
codebook factcheck_w4

** Placebo Condition
tab count_placebo_Q_w4_pg if fact_check_treat==2 /*96.9% correct first time*/
tab fail_placebo_Q_w4_3times if fact_check_treat==2 /*.14% fail 3x*/
tab placebo_Q_w4 /*see above*/

**Democrat
*Democrat: 1 if respondent self-identifies as a Democrat or leans toward the Democratic Party, 0 if they do not lean toward either party, lean Republican, or self-identify as a Republican.
tab pid7
recode pid7 (1/3=1 "Democrat") (4/8=0 "Non-Democrat") (.=.), gen(democrat_w4)
label var democrat_w4 "Democrat Dummy"
codebook democrat_w4

**Republican 

*Republican: 1 if respondent self-identifies as a Republican or leans toward the Republican Party, 0 if they do not lean toward either party, lean Democrat, or self-identify as a Democrat.
recode pid7 (1/4 8 = 0 "Non-Republican") (5/7=1 "Republican") (.=.), gen(republican_w4)
label var republican_w4 "Republican Dummy"
codebook republican_w4

*PID 3-Point

*Three-point party ID scale: Democrats including leaners (1), true independents (2), Republicans including leaners (3).
recode pid7 (1/3=1 "Democrats") (4=2 "Independents") (5/7=3 "Republicans") (8=.) (.=.), gen(pid3_recode_w4)
label var pid3_recode_w4 "PID 3-Pt (Recode from PID7)"
codebook pid3_recode_w4
***NOTE: above treats "Not sure" (pid7=8) as missing though treated as 0 for democrat/republican

** quietly lasso variables

*Party ID (three-point)
*made above

**DEVIATION: five-point not seven

*Biden rightful winner (1-4)
*made above

*Seats changed in 2020 (1-4)
*made above

*Seats changed in 2022 (1-4)
*made above

*Fraud prevalence 2020 (mean: 1-7)
*made above

*Confidence in 2020 election (mean: 1-4)
*made above

*Confidence in 2022 election (mean: 1-4)
*made above

*Feelings toward Joe Biden (0-100)
codebook Q14_w4
gen bidentherm_w4=Q14_w4

*Feelings toward Donald Trump (0-100)
codebook Q13_w4
gen trumptherm_w4=Q13_w4

*Feelings toward Democrats (0-100)
codebook Q11_w4
gen demtherm_w4=Q11_w4

*Feelings toward Republicans (0-100)
codebook Q12_w4
gen reptherm_w4=Q12_w4

*Feelings toward news media (0-100)
codebook Q15_w4
gen mediatherm_w4=Q15_w4

*Feelings toward election officials (0-100)
codebook Q16_w4
gen electionofficialtherm_w4=Q16_w4

*Feelings toward white people (0-100)
codebook Q18_w4
gen whitetherm_w4=Q18_w4

*Feelings toward Black people (0-100)
codebook Q17_w4
gen blacktherm_w4=Q17_w4

*Voted in 2022
codebook Q23_w4
recode Q23_w4 (4=1 "Voted") (1/3=0 "Did Not Vote"), gen(turnout_dum_2022)
label var turnout_dum_2022 "2022 Turnout Dummy"
codebook turnout_dum_2022

*demos
tab educ
tab gender
tab pid7
tab race
su birthyr, detail

*COMPLETING INITIAL PREREG ANALYSIS

*W1 RQ4: Do any observed effects persist in future waves (i.e., are effects measurable in waves 2 and/or 3 for H1, H2, RQ1a, RQ1b, RQ2a, RQ2b, RQ3a, or RQ3b?)

*We will repeat the analyses above estimating the effects of treatment assignment in wave 1 on identical survey outcomes in waves 2 and 3. (These analyses will select from the same set of potential quietly lasso controls as measured in wave 1.) 

*RQ4 analyses will be conducted using pre-treatment outcome measures from wave 2. 

rename caseid caseid_orig
rename caseid_DART0053_W1 caseid 
merge 1:1 caseid using "2022w1.dta"
tab _merge

tab condition_treat_w1 _merge, chi2 /*no evidence of differential attrition*/
drop if _merge==2

*H1: Exposure to a correction treatment (compared to a placebo condition) will increase confidence in the 2020 election and reduce beliefs about the prevalence and effects of fraud (Frequency of voter fraud, the number of seats changed by fraud, and whether Joe Biden is the rightful winner) in the 2020 election.

*RQ1b: Will exposure to a inoculation treatment (compared to a placebo condition) increase confidence in the 2020 election and reduce beliefs about the prevalence and effects of fraud (Frequency of voter fraud, the number of seats changed by fraud, and whether Joe Biden is the rightful winner) in the 2020 election? 

*RQ3a: Is there a difference between the effects of the correction and inoculation treatment on confidence in the 2020 election or beliefs about the prevalence and effects of fraud (Frequency of voter fraud, the number of seats changed by fraud, and whether Joe Biden is the rightful winner) in the 2020 election?

*H1/RQ1b: Confidence in 2020 vote = B0 + B1*correction + B2*inoculation + quietly lasso controls
*RQ3a: B1-B2

quietly lasso linear confidence_2020_w3_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local confidence_2020_w3_pst_ctl=e(allvars_sel) 

reg confidence_2020_w3_post correction inoculation `confidence_2020_w3_pst_ctl', robust
est store conf20w3
lincom correction-inoculation

quietly lasso linear confidence_2020_w4 college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local confidence_2020_w4_ctl=e(allvars_sel) 

reg confidence_2020_w4 correction inoculation `confidence_2020_w4_ctl', robust
est store conf20w4
lincom correction-inoculation

foreach var of varlist conf_yrvote_w4 conf_locvote_w4 conf_stvote_w4 conf_stvote_w4 {
quietly lasso linear `var' college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local ctl=e(allvars_sel) 
reg `var' correction inoculation `ctl', robust
est store `var't
}

estout *t using "conf20w4-by-dv.tex", label keep(correction inoculation) style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** 0.005) 
est drop *t

coefplot conf20w3 (conf20w4, ciopts(lcolor(white)) mcolor(white)),keep(correction inoculation) xline(0) scheme(lean1) xtitle("Confidence in 2020 vote count (mean)") legend(lab(2 "Wave 1") lab(4 " "))
graph export "conf20-by-wave-one.png", replace

coefplot conf20w3 conf20w4,keep(correction inoculation) xline(0) scheme(lean1) xtitle("Confidence in 2020 vote count (mean)") legend(lab(2 "Wave 1") lab(4 "Wave 2"))
graph export "conf20-by-wave-both.png", replace

preserve

rename confidence_2020_w3_post conf1
rename confidence_2020_w4 conf2

reshape long conf, i(caseid) j(wave)

reg conf correction##wave inoculation##wave `confidence_2020_w3_pst_ctl', cluster(caseid) /*add wave 3 controls*/
est store conf20_wavediff

label def wavelab 1 "Oct./Nov. 2022" 2 "Dec. 2022" 
label val wave wavelab

cibar conf, over1(cond) over2(wave) graphopts(scheme(lean1) legend(on) ytitle("") yscale(r(1 4)) ylabel(1 "Not at all confident (1)" 2 "Not very confident (2)" 3 "Somewhat confident (3)" 4 "Very confident (4)") xtitle("Confidence in 2020 vote count (mean)"))
graph export "conf20w1treat-by-wave.pdf", replace
graph export "conf20w1treat-by-wave.png", replace

bysort cond wave: egen confmean=mean(conf)

twoway (connected confmean wave if cond==1)(connected confmean wave if cond==2)(connected confmean wave if cond==3, scheme(lean1) ytitle("") yscale(r(1 4)) ylabel(1 "Not at all confident (1)" 2 "Not very confident (2)" 3 "Somewhat confident (3)" 4 "Very confident (4)") xtitle("Confidence in 2020 vote count (mean)") xscale(r(.8 2.2)) xlabel(1 "Oct./Nov." 2 "Dec.") legend(lab(1 "Placebo") lab(2 "Correction") lab(3 "Prebunking")))

restore

preserve

rename biden_rwin_w3_post biden1
rename biden_rwin_w4_post biden2

reshape long biden, i(caseid) j(wave)

reg biden correction##wave inoculation##wave `biden_rwin_w3_post_pst_ctl', cluster(caseid) /*add wave 3 controls*/
est store biden_wavediff

restore

preserve

rename fraud2020w3_post fraud1
rename fraud2020w4_post fraud2

reshape long fraud, i(caseid) j(wave)

reg fraud correction##wave inoculation##wave `fraud2020pst_ctl', cluster(caseid) /*add wave 3 controls*/
est store fraud_wavediff

restore

preserve

rename seats_won_fraud_2020_w3_post seats1
rename seats_won_fraud_2020_w4_post seats2

reshape long seats, i(caseid) j(wave)

reg seats correction##wave inoculation##wave `fraud2020pst_ctl', cluster(caseid) /*add wave 3 controls*/
est store seats20_wavediff

restore



*H1/RQ1b: 2020 fraud prevalence = B0 + B1*correction + B2*inoculation + quietly lasso controls
*RQ3a: B1-B2
	
quietly lasso linear fraud2020w4_pre college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local fraud2020w4_pre_ctl=e(allvars_sel) 

reg fraud2020w4_pre correction inoculation `fraud2020w4_pre_ctl', robust
est store fraudw4
lincom correction-inoculation

quietly lasso linear fraud2020w3_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local fraud2020pst_ctl=e(allvars_sel) 

reg fraud2020w3_post correction inoculation `fraud2020pst_ctl', robust
est store fraudw3
lincom correction-inoculation

foreach var of varlist conf_yrvote_w4_post conf_locvote_w4_post conf_stvote_w4_post conf_stvote_w4_post {
quietly lasso linear `var' college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local ctl=e(allvars_sel) 
reg `var' correction inoculation `ctl', robust
est store `var't
}

estout *t using "conf20w4-by-dv.tex", label keep(correction inoculation) style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** 0.005) 
est drop *t

coefplot fraudw3 (fraudw4, ciopts(lcolor(white)) mcolor(white)),keep(correction inoculation) xline(0) scheme(lean1) xtitle("Confidence in 2020 vote count (mean)") legend(lab(2 "Wave 1") lab(4 " "))
graph export "fraud20-by-wave-one.png", replace

coefplot fraudw3 fraudw4,keep(correction inoculation) xline(0) scheme(lean1) xtitle("Belief in 2020 fraud prevalence (mean)") legend(lab(2 "Wave 1") lab(4 "Wave 2"))
graph export "fraud20-by-wave-both.png", replace

preserve

rename fraud2020w3_post fraud1
rename fraud2020w4_pre fraud2

reshape long fraud, i(caseid) j(wave)

label def wavelab 1 "Oct./Nov. 2022" 2 "Dec. 2022" 
label val wave wavelab

cibar fraud, over1(cond) over2(wave) graphopts(scheme(lean1) legend(on) ytitle("") ylabel(1 "Less than ten (1)" 2 "Less than a hundred (2)" 3 "Hundreds (3)" 4 "Thousands (4)" 5 "Tens of thousands (5)" 6 "Hundreds of thousands (6)" 7 "A million or more (7)") xtitle("Belief in 2020 fraud prevalence (mean)"))
graph export "fraud20w1treat-by-wave.pdf", replace
graph export "fraud20w1treat-by-wave.png", replace

bysort cond wave: egen fraudmean=mean(fraud)

twoway (connected fraudmean wave if cond==1)(connected fraudmean wave if cond==2)(connected fraudmean wave if cond==3, scheme(lean1) ytitle("") ylabel(1 "Less than ten (1)" 2 "Less than a hundred (2)" 3 "Hundreds (3)" 4 "Thousands (4)" 5 "Tens of thousands (5)" 6 "Hundreds of thousands (6)" 7 "A million or more (7)") xtitle("Belief in 2020 fraud prevalence (mean)") xscale(r(.8 2.2)) xlabel(1 "Oct./Nov." 2 "Dec.") legend(lab(1 "Placebo") lab(2 "Correction") lab(3 "Prebunking")))

restore
	
*H1/RQ1b: Seats changed in 2020 = B0 + B1*correction + B2*inoculation + quietly lasso controls
*RQ3a: B1-B2

quietly lasso linear seats_won_fraud_2020_w3_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local seats_won_fraud_2020_w3_pst_ctl=e(allvars_sel) 

reg seats_won_fraud_2020_w3_post correction inoculation `seats_won_fraud_2020_w3_pst_ctl', robust
est store seats20w3
lincom correction-inoculation

quietly lasso linear seats_won_fraud_2020_w4 college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local seats_won_fraud_2020_w4_ctl=e(allvars_sel) 

reg seats_won_fraud_2020_w4 correction inoculation `seats_won_fraud_2020_w4_ctl', robust
est store seats20w4
lincom correction-inoculation

coefplot seats20w3 (seats20w4, ciopts(lcolor(white)) mcolor(white)),keep(correction inoculation) xline(0) scheme(lean1) xtitle("Belief in seats won due to fraud in 2020") legend(lab(2 "Wave 1") lab(4 " "))
graph export "seats20-by-wave-one.png", replace

coefplot seats20w3 seats20w4,keep(correction inoculation) xline(0) scheme(lean1) xtitle("Belief in seats won due to fraud in 2020") legend(lab(2 "Wave 1") lab(4 "Wave 2"))
graph export "seats20-by-wave-both.png", replace

preserve

rename seats_won_fraud_2020_w3_post seats1
rename seats_won_fraud_2020_w4 seats2

reshape long seats, i(caseid) j(wave)

label def wavelab 1 "Oct./Nov. 2022" 2 "Dec. 2022" 
label val wave wavelab

cibar seats, over1(cond) over2(wave) graphopts(scheme(lean1) legend(on) ytitle("") yscale(r(1 4)) ylabel(1 "None (1)" 2 "One or two (2)" 3 "Three to nine (3)" 4 "Ten or more (4)") xtitle("Belief in seats won due to fraud in 2020"))
graph export "seats20w1treat-by-wave.pdf", replace
graph export "seats20w1treat-by-wave.png", replace

bysort cond wave: egen seatsmean=mean(seats)

twoway (connected seatsmean wave if cond==1)(connected seatsmean wave if cond==2)(connected seatsmean wave if cond==3, scheme(lean1) ytitle("") yscale(r(1 4)) ylabel(1 "None (1)" 2 "One or two (2)" 3 "Three to nine (3)" 4 "Ten or more (4)") xtitle("Belief in seats won due to fraud in 2020") xscale(r(.8 2.2)) xlabel(1 "Oct./Nov." 2 "Dec.") legend(lab(1 "Placebo") lab(2 "Correction") lab(3 "Prebunking")))

restore

*H1/RQ1b: Biden rightful winner in 2020 = B0 + B1*correction + B2*inoculation + quietly lasso controls
*RQ3a: B1-B2

quietly lasso linear biden_rwin_w3_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local biden_rwin_w3_post_pst_ctl=e(allvars_sel) 

reg biden_rwin_w3_post correction inoculation `biden_rwin_w3_post_pst_ctl', robust
est store bidenw3
lincom correction-inoculation

quietly lasso linear biden_rwin_w4 college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local biden_rwin_w4_ctl=e(allvars_sel) 

reg biden_rwin_w4 correction inoculation `biden_rwin_w4_ctl', robust
est store bidenw4
est store bidenw4orig
lincom correction-inoculation

reg biden_rwin_w4 correction inoculation biden_rwin_w3, robust
est store bidenw4orig_ldv

reg biden_rwin_w4 correction inoculation, robust
est store bidenw4orig_noc

gen binary_biden_rwin_w3=(biden_rwin_w3>2.5 & biden_rwin_w3!=.)

reg biden_rwin_w4 correction##binary_biden_rwin_w3 inoculation##binary_biden_rwin_w3 `biden_rwin_w4_ctl', robust

coefplot bidenw3 (bidenw4, ciopts(lcolor(white)) mcolor(white)),keep(correction inoculation) xline(0) scheme(lean1) xtitle("Belief Biden rightful winner in 2020") legend(lab(2 "Wave 1") lab(4 " "))
graph export "biden-by-wave-one.png", replace

coefplot bidenw3 bidenw4,keep(correction inoculation) xline(0) scheme(lean1) xtitle("Belief Biden rightful winner in 2020") legend(lab(2 "Wave 1") lab(4 "Wave 2"))
graph export "biden-by-wave-both.png", replace
	
*H2: Exposure to an inoculation treatment (compared to a placebo condition) will increase confidence in the 2022 election and reduce beliefs about the prevalence and effects of fraud (Frequency of voter fraud, the number of seats changed by fraud) in the 2022 election.

*RQ1a: Will exposure to a correction treatment (compared to a placebo condition) increase confidence in the 2022 election and reduce beliefs about the prevalence and effects of fraud (Frequency of voter fraud, the number of seats changed by fraud) in the 2022 election?

*RQ3b: Is there a difference between the effects of the correction and inoculation treatment on confidence in the 2022 election or beliefs about the prevalence and effects of fraud (Frequency of voter fraud, the number of seats changed by fraud) in the 2022 election?

*H2/RQ1a: Confidence in 2022 vote = B0 + B1*correction + B2*inoculation + quietly lasso controls
*RQ3b: B1-B2 

quietly lasso linear confidence_2022_w3_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local confidence_2022_w3_pst_ctl=e(allvars_sel) 

reg confidence_2022_w3_post correction inoculation `confidence_2022_w3_pst_ctl', robust
est store conf22w3
lincom correction-inoculation

quietly lasso linear confidence_2022_w4 college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local confidence_2022_w4_ctl=e(allvars_sel) 

reg confidence_2022_w4 correction inoculation `confidence_2022_w4_ctl', robust
est store conf22w4
lincom correction-inoculation

coefplot conf22w3 (conf22w4, ciopts(lcolor(white)) mcolor(white)),keep(correction inoculation) xline(0) scheme(lean1) xtitle("Confidence in 2022 vote count (mean)") legend(lab(2 "Wave 1") lab(4 " "))
graph export "conf22-by-wave-one.png", replace

coefplot conf22w3 conf22w4,keep(correction inoculation) xline(0) scheme(lean1) xtitle("Confidence in 2022 vote count (mean)") legend(lab(2 "Wave 1") lab(4 "Wave 2"))
graph export "conf22-by-wave-both.png", replace
	
*H2/RQ1a: 2022 fraud prevalence = B0 + B1*correction + B2*inoculation + quietly lasso controls
*RQ3b: B1-B2 

*DEVIATION: no 2022 fraud scale

*H2/RQ1a: Seats changed in 2022 = B0 + B1*correction + B2*inoculation + quietly lasso controls
*RQ3b: B1-B2 

quietly lasso linear seats_won_fraud_2022_w3_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local seats_won_fraud_2022_w3_pst_ctl=e(allvars_sel) 

reg seats_won_fraud_2022_w3_post correction inoculation `seats_won_fraud_2022_w3_pst_ctl', robust
est store seats22w3
lincom correction-inoculation

quietly lasso linear seats_won_fraud_2022_w4 college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local seats_won_fraud_2022_w4_ctl=e(allvars_sel) 

reg seats_won_fraud_2022_w4 correction inoculation `seats_won_fraud_2022_w4_ctl', robust
est store seats22w4
lincom correction-inoculation

coefplot seats22w3 (seats22w4, ciopts(lcolor(white)) mcolor(white)),keep(correction inoculation) xline(0) scheme(lean1) xtitle("Belief in seats won due to fraud in 2022") legend(lab(2 "Wave 1") lab(4 " "))
graph export "seats22-by-wave-one.png", replace

coefplot seats22w3 seats22w4,keep(correction inoculation) xline(0) scheme(lean1) xtitle("Belief in seats won due to fraud in 2022") legend(lab(2 "Wave 1") lab(4 "Wave 2"))
graph export "seats22-by-wave-both.png", replace

estout bidenw3 bidenw4 conf20w3 conf20w4 conf22w3 conf22w4 fraudw3 fraudw4 seats20w3 seats20w4 seats22w3 seats22w4 using "w3-persistence.tex", keep(correction inoculation) label style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** 0.005) 

preserve

rename seats_won_fraud_2022_w3_post seats1
rename seats_won_fraud_2022_w4 seats2

reshape long seats, i(caseid) j(wave)

label def wavelab 1 "Oct./Nov. 2022" 2 "Dec. 2022" 
label val wave wavelab

cibar seats, over1(cond) over2(wave) graphopts(scheme(lean1) legend(on) ytitle("") yscale(r(1 4)) ylabel(1 "None (1)" 2 "One or two (2)" 3 "Three to nine (3)" 4 "Ten or more (4)") xtitle("Belief in seats won due to fraud in 2022"))
graph export "seats22w1treat-by-wave.pdf", replace
graph export "seats22w1treat-by-wave.png", replace

bysort cond wave: egen seatsmean=mean(seats)

twoway (connected seatsmean wave if cond==1)(connected seatsmean wave if cond==2)(connected seatsmean wave if cond==3, scheme(lean1) ytitle("") yscale(r(1 4)) ylabel(1 "None (1)" 2 "One or two (2)" 3 "Three to nine (3)" 4 "Ten or more (4)") xtitle("Belief in seats won due to fraud in 2022") xscale(r(.8 2.2)) xlabel(1 "Oct./Nov." 2 "Dec.") legend(lab(1 "Placebo") lab(2 "Correction") lab(3 "Prebunking")))

restore

*NEW W2 ANALYSES

*NOTE: If we follow the approach above for analyses using Wave 2 treatment assignment, we will use Wave 2 manipulation check and pre-treatment attention check questions.

*quietly lasso covariates will be selected separately for each outcome, including separately when an outcome is measured in multiple waves. The set of candidate covariates in the list above will always be used. When a covariate has been measured in multiple waves, we will use the most recent pre-treatment measure of the covariate in the model in question (where "pre-treatment" is defined with respect to the treatment variable(s) in the model being estimated).

*H3: Exposure to a correction treatment debunking false claims about election fraud in Arizona (compared to a placebo condition) will reduce false beliefs that issues tabulating ballots in Maricopa County were only experienced at voting sites in conservative areas (H3a) and that Katie Hobbs won the gubernatorial election due to election fraud and is not the rightful winner (H3b).

*H3a: Maricopa misperceptions = B0 + B1*w2_correction + B2*w1_correction + B3*w1_inoculation + quietly lasso controls

quietly lasso linear AZmaricopa_w4 college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local AZmaricopa_w4_ctl=e(allvars_sel) 

reg AZmaricopa_w4 factcheck_w4 correction inoculation `AZmaricopa_w4_ctl', robust
est store maricopa

reg AZmaricopa_w4 factcheck_w4 correction inoculation, robust
est store maricopa_noc

bysort factcheck_w4: su AZmaricopa_w4

label def fclab 0 "Placebo" 1 "AZ factcheck" 
label val factcheck fclab

cibar AZmaricopa_w4, over1(factcheck) graphopts(scheme(lean1) legend(on) ytitle("") yscale(r(1 4)) ylabel(1 "Not at all accurate" 2 "Not very accurate" 3 "Somewhat accurate" 4 "Very accurate") xtitle("Belief in AZ ballot printing error conspiracy"))
graph export "azmaricopa.pdf", replace

*H3b: Hobbs won due to fraud = B0 + B1*w2_correction + B2*w1_correction + B3*w1_inoculation + quietly lasso controls

quietly lasso linear AZgov_rightful_w4 college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local AZgov_rightful_ctl=e(allvars_sel) 

reg AZgov_rightful_w4 factcheck_w4 correction inoculation `AZgov_rightful_ctl', robust
est store AZright

reg AZgov_rightful_w4 factcheck_w4 correction inoculation, robust
est store AZright_noc

bysort factcheck_w4: su AZgov_rightful_w4

cibar AZgov_rightful_w4, over1(factcheck) graphopts(scheme(lean1) legend(on) ytitle("") yscale(r(1 4)) ylabel(1 "Strongly disagree" 2 "Somewhat disagree" 3 "Somewhat agree" 4 "Strongly agree") xtitle("Belief that Hobbs NOT rightful winner in AZ GOV"))
graph export "azightful.pdf", replace

*RQ5a: Will exposure to a correction treatment debunking false claims about election fraud in Arizona (compared to a placebo condition) affect confidence in the 2022 election and beliefs about the prevalence and effects of fraud (Frequency of voter fraud and the number of seats changed by fraud) in the 2022 election?

*RQ5a: Confidence in 2022 vote = B0 + B1*w2_correction + B2*w1_correction + B3*w1_inoculation + quietly lasso controls
*2022 fraud prevalence = B0 + B1*w2_correction + B2*w1_correction + B3*w1_inoculation + quietly lasso controls
*Seats changed in 2022 = B0 + B1*w2_correction + B2*w1_correction + B3*w1_inoculation + quietly lasso controls

quietly lasso linear confidence_2022_w4_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local confidence_2022_w4_pst_ctl=e(allvars_sel) 

reg confidence_2022_w4_post factcheck_w4 correction inoculation `confidence_2022_w4_pst_ctl', robust
est store conf22
est store conf22forAZ

reg confidence_2022_w4_post factcheck_w4 correction inoculation, robust
est store conf22_noc

quietly lasso linear confidence_2022_w4 college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local confidence_2022_w4_pre_ctl=e(allvars_sel) 

reg confidence_2022_w4 correction inoculation `confidence_2022_w4_pre_ctl', robust
est store conf22w4orig 
est store conf22pre

reg confidence_2022_w4 correction inoculation confidence_2022_w3, robust
est store conf22w4orig_ldv

reg confidence_2022_w4 correction inoculation, robust
est store conf22w4orig_noc
	
*DEVIATION: fraud prevalence in 2022 not asked

quietly lasso linear seats_won_fraud_2022_w4_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local seats_won_fraud_2022_w4_pst_ctl=e(allvars_sel) 

reg seats_won_fraud_2022_w4_post factcheck_w4 correction inoculation `seats_won_fraud_2022_w4_pst_ctl', robust
est store seats22
est store seats22forAZ

reg seats_won_fraud_2022_w4_post factcheck_w4 correction inoculation, robust
est store seats22_noc

quietly lasso linear seats_won_fraud_2022_w4 college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local seats_won_fraud_2022_w4_pre_ctl=e(allvars_sel) 

reg seats_won_fraud_2022_w4 correction inoculation `seats_won_fraud_2022_w4_pre_ctl', robust
est store seats22w4orig
est store seats22pre

reg seats_won_fraud_2022_w4 correction inoculation seats_won_fraud_2022_w3, robust
est store seats22w4orig_ldv

reg seats_won_fraud_2022_w4 correction inoculation, robust
est store seats22w4orig_noc

*RQ5b: Will exposure to a correction treatment debunking false claims about election fraud in Arizona (compared to a placebo condition) affect confidence in the 2020 election and beliefs about the prevalence and effects of fraud (Frequency of voter fraud, the number of seats changed by fraud, and whether Joe Biden is the rightful winner) in the 2020 election?

*RQ5b: Confidence in 2020 vote = B0 + B1*w2_correction + B2*w1_correction + B3*w1_inoculation + quietly lasso controls
*2020 fraud prevalence = B0 + B1*w2_correction + B2*w1_correction + B3*w1_inoculation + quietly lasso controls
*Seats changed in 2020 = B0 + B1*w2_correction + B2*w1_correction + B3*w1_inoculation + quietly lasso controls
*Biden rightful winner in 2020 = B0 + B1*w2_correction + B2*w1_correction + B3*w1_inoculation + quietly lasso controls

quietly lasso linear confidence_2020_w4_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local confidence_2020_w4_pst_ctl=e(allvars_sel) 

reg confidence_2020_w4_post factcheck_w4 correction inoculation `confidence_2020_w4_pst_ctl', robust
est store conf20 

reg confidence_2020_w4_post factcheck_w4 correction inoculation, robust
est store conf20_noc

quietly lasso linear confidence_2020_w4 college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local confidence_2020_w4_pre_ctl=e(allvars_sel) 

reg confidence_2020_w4 correction inoculation `confidence_2020_w4_pre_ctl', robust
est store conf20pre
est store conf20w4orig

reg confidence_2020_w4 correction inoculation confidence_2020_w3, robust
est store conf20w4orig_ldv

reg confidence_2020_w4 correction inoculation, robust
est store conf20w4orig_noc

quietly lasso linear fraud2020w4_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local fraud2020w4_pst_ctl=e(allvars_sel) 

reg fraud2020w4_post factcheck_w4 correction inoculation `fraud2020w4_pst_ctl', robust
est store fraud20

reg fraud2020w4_post factcheck_w4 correction inoculation, robust
est store fraud20_noc

quietly lasso linear fraud2020w4_pre college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local fraud2020w4_pre_ctl=e(allvars_sel) 

reg fraud2020w4_pre factcheck_w4 correction inoculation `fraud2020w4_pre_ctl', robust
est store fraud20pre
est store fraud20w4orig

reg fraud2020w4_pre factcheck_w4 correction inoculation fraud2020w3_pre, robust
est store fraud20w4orig_ldv

reg fraud2020w4_pre factcheck_w4 correction inoculation, robust
est store fraud20w4orig_noc

quietly lasso linear seats_won_fraud_2020_w4_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local seats_won_fraud_2020_w4_pst_ctl=e(allvars_sel) 

reg seats_won_fraud_2020_w4_post factcheck_w4 correction inoculation `seats_won_fraud_2020_w4_pst_ctl', robust
est store seats20 

reg seats_won_fraud_2020_w4_post factcheck_w4 correction inoculation, robust
est store seats20_noc

quietly lasso linear seats_won_fraud_2020_w4 college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local seats_won_fraud_2020_w4_pre_ctl=e(allvars_sel) 

reg seats_won_fraud_2020_w4 factcheck_w4 correction inoculation `seats_won_fraud_2020_w4_pre_ctl', robust
est store seats20pre 
est store seats20w4orig

reg seats_won_fraud_2020_w4 factcheck_w4 correction inoculation seats_won_fraud_2020_w3, robust
est store seats20w4orig_ldv

reg seats_won_fraud_2020_w4 factcheck_w4 correction inoculation, robust
est store seats20w4orig_noc

tab confidence_2020_w4 
tab confidence_2022_w4 
tab seats_won_fraud_2020_w4 
tab seats_won_fraud_2022_w4 
tab fraud2020w4_pre 

coefplot (maricopa, rename(factcheck_w4="maricopa")) (AZright, rename(factcheck_w4="AZright")) (conf22, rename(factcheck_w4="conf22")) (seats22, rename(factcheck_w4="seats22")) (conf20,rename(factcheck_w4="conf20")) (fraud20, rename(factcheck_w4="fraud20")) (seats20, rename(factcheck_w4="seats20")), keep(factcheck_w4) xline(0) scheme(lean1) xtitle("Treatment effect") coeflabel(maricopa  = "Maricopa fraud myth" AZright = "Hobbs wrongful winner myth" conf22 = "Confidence in 2022 election" seats22 = "Seats won by fraud in 2022" conf20 = "Confidence in 2020 election" fraud20 = "Fraud prevalence in 2020" seats20 = "Seats won by fraud in 2020") legend(off) grid(none) offset(0) headings(maricopa = "{bf:Specific: 2022 AZ GOV election}" conf22 = "{bf:General: 2022 U.S. elections}" conf20 = "{bf:General: 2020 U.S. elections}")
graph export "azcoefs.pdf", replace
graph export "azcoefs.png", replace

estout maricopa AZright conf22 seats22 conf20 fraud20 seats20 using "azcoefs.tex", label keep(factcheck_w4 correction inoculation) style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** 0.005) 

estout maricopa_noc AZright_noc conf22_noc seats22_noc conf20_noc fraud20_noc seats20_noc using "azcoefs_noc.tex", label keep(factcheck_w4 correction inoculation) style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** 0.005) 

coefplot (conf20pre, rename(correction="conf20pre"))  (conf22pre, rename(correction="conf22pre")) (fraud20pre, rename(correction="fraud20pre")) (seats20pre, rename(correction="seats20pre")) (seats22pre, rename(correction="seats22pre")), keep(correction) grid(none) xline(0) scheme(lean1) xtitle("Treatment effect") coeflabel(conf22pre  = "Confidence in 2022 election" seats22pre = "Seats won by fraud in 2022" conf20pre = "Confidence in 2020 election" fraud20pre = "Fraud prevalence in 2020" seats20pre = "Seats won by fraud in 2020") legend(off) offset(0) xscale(r(-.25 .1)) xlabel(-.2 -.1 0 .1)
graph export "wave2-w1correction.pdf", replace
graph export "wave2-w1correction.png", replace

coefplot (conf20pre, rename(inoculation="conf20pre"))  (conf22pre, rename(inoculation="conf22pre")) (fraud20pre, rename(inoculation="fraud20pre")) (seats20pre, rename(inoculation="seats20pre")) (seats22pre, rename(inoculation="seats22pre")), keep(inoculation) grid(none) xline(0) scheme(lean1) xtitle("Treatment effect") coeflabel(conf22pre  = "Confidence in 2022 election" seats22pre = "Seats won by fraud in 2022" conf20pre = "Confidence in 2020 election" fraud20pre = "Fraud prevalence in 2020" seats20pre = "Seats won by fraud in 2020") legend(off) offset(0) xscale(r(-.25 .1)) xlabel(-.2 -.1 0 .1)
graph export "wave2-w1inoculation.pdf", replace
graph export "wave2-w1inoculation.png", replace

*Finally, we may conduct exploratory analyses of potential heterogeneous treatment effects for the following moderators for the models used to test H3, RQ5a, RQ5b: 
*-party identification
*-Trump feeling thermometer
*-pre-treatment measure of outcome (where available)
*-assignment to wave 1 treatment (correction, pre-bunking, placebo)

reg AZmaricopa_w4 factcheck_w4 correction inoculation `AZmaricopa_w4_ctl', robust
reg AZmaricopa_w4 factcheck##independent_w3##republican_w3 correction inoculation `AZmaricopa_w4_ctl', robust
est store AZmaricopa_w4_party 
reg AZmaricopa_w4 factcheck##ib1.trumpq correction inoculation `AZmaricopa_w4_ctl', robust
est store AZmaricopa_w4_trump
reg AZmaricopa_w4 factcheck##correction##inoculation `AZmaricopa_w4_ctl', robust
est store AZmaricopa_w4_w1treatment 

estout AZmaricopa_w4_party AZmaricopa_w4_trump AZmaricopa_w4_w1treatment using "AZMaricopa_w4_interactions.tex", label style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** 0.005) 

reg AZgov_rightful factcheck_w4 correction inoculation `AZgov_rightful_ctl', robust
reg AZgov_rightful factcheck##independent_w3##republican_w3 correction inoculation `AZgov_rightful_ctl', robust
est store AZgov_rightful_party
reg AZgov_rightful factcheck##ib1.trumpq correction inoculation `AZgov_rightful_ctl', robust
est store AZgov_rightful_trump
reg AZgov_rightful factcheck##correction##inoculation `AZgov_rightful_ctl', robust
est store AZgov_rightful_w1treatment

estout AZgov_rightful_party AZgov_rightful_trump AZgov_rightful_w1treatment using "AZgov_rightful_interactions.tex", label style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** 0.005) 

reg confidence_2022_w4_post factcheck_w4 correction inoculation `confidence_2022_w4_pst_ctl', robust
reg confidence_2022_w4_post factcheck##independent_w3##republican_w3 correction inoculation `confidence_2022_w4_pst_ctl', robust
est store conf2022w4postparty
reg confidence_2022_w4_post factcheck##ib1.trumpq correction inoculation `confidence_2022_w4_pst_ctl', robust
est store conf2022w4posttrump
reg confidence_2022_w4_post factcheck##ib3.conf2022q correction inoculation `confidence_2022_w4_pst_ctl', robust
est store conf2022w4postpre
reg confidence_2022_w4_post factcheck##correction##inoculation `confidence_2022_w4_pst_ctl', robust
est store conf2022w4postw1treat

estout conf2022w4post* using "confidence_2022_w4_post_interactions.tex", label style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** 0.005) 

reg seats_won_fraud_2022_w4_post factcheck_w4 correction inoculation `seats_won_fraud_2022_w4_pst_ctl', robust
reg seats_won_fraud_2022_w4_post factcheck##independent_w3##republican_w3 correction inoculation `seats_won_fraud_2022_w4_pst_ctl', robust
est store seats_fraud_2022_party
reg seats_won_fraud_2022_w4_post factcheck##ib1.trumpq correction inoculation `seats_won_fraud_2022_w4_pst_ctl', robust
est store seats_fraud_2022_trump
reg seats_won_fraud_2022_w4_post factcheck##ib1.seats_won_fraud_2022_w3 correction inoculation `seats_won_fraud_2022_w4_pst_ctl', robust
est store seats_fraud_2022_pre
reg seats_won_fraud_2022_w4_post factcheck##correction##inoculation `seats_won_fraud_2022_w4_pst_ctl', robust
est store seats_fraud_2022_w1treat

estout seats_fraud_2022* using "seats_won_fraud_2022_w4_post_interactions.tex", label style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** 0.005) 

reg confidence_2020_w4_post factcheck_w4 correction inoculation `confidence_2020_w4_pst_ctl', robust
reg confidence_2020_w4_post factcheck##independent_w3##republican_w3 correction inoculation `confidence_2020_w4_pst_ctl', robust
est store conf_2020_party
reg confidence_2020_w4_post factcheck##ib1.trumpq correction inoculation `confidence_2020_w4_pst_ctl', robust
est store conf_2020_trump
reg confidence_2020_w4_post factcheck##ib3.conf2020q correction inoculation `confidence_2020_w4_pst_ctl', robust
est store conf_2020_pre
reg confidence_2020_w4_post factcheck##correction##inoculation `confidence_2020_w4_pst_ctl', robust
est store conf_2020_w1treat

estout conf_2020_* using "confidence_2020_w4_post_interactions.tex", label style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** 0.005) 

reg fraud2020w4_post factcheck_w4 correction inoculation `fraud2020w4_pst_ctl', robust
reg fraud2020w4_post factcheck##independent_w3##republican_w3 correction inoculation `fraud2020w4_pst_ctl', robust
est store fraud2020w4_post_party
reg fraud2020w4_post factcheck##ib1.trumpq correction inoculation `fraud2020w4_pst_ctl', robust
est store fraud2020w4_post_trump
reg fraud2020w4_post factcheck##ib1.fraud2020q_w3 correction inoculation `fraud2020w4_pst_ctl', robust
est store fraud2020w4_post_pre
reg fraud2020w4_post factcheck##correction##inoculation `fraud2020w4_pst_ctl', robust
est store fraud2020w4_post_w1treat 

estout fraud2020w4_post* using "fraud2020w4_post_interactions.tex", label style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** 0.005) 

reg seats_won_fraud_2020_w4_post factcheck_w4 correction inoculation `seats_won_fraud_2020_w4_pst_ctl', robust
reg seats_won_fraud_2020_w4_post factcheck##independent_w3##republican_w3 correction inoculation `seats_won_fraud_2020_w4_pst_ctl', robust
est store seats2020w4post_party
reg seats_won_fraud_2020_w4_post factcheck##ib1.trumpq correction inoculation `seats_won_fraud_2020_w4_pst_ctl', robust
est store seats2020w4post_trump
reg seats_won_fraud_2020_w4_post factcheck##ib1.seats_won_fraud_2020_w3 correction inoculation `seats_won_fraud_2020_w4_pst_ctl', robust
est store seats2020w4post_post_pre
reg seats_won_fraud_2020_w4_post factcheck##correction##inoculation `seats_won_fraud_2020_w4_pst_ctl', robust
est store seats2020w4post_w1treat 

estout seats2020w4post* using "seats_won_fraud_2020_w4_post_interactions.tex", label style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** 0.005) 

/*no controls*/

reg AZmaricopa_w4 factcheck_w4 correction inoculation, robust
reg AZmaricopa_w4 factcheck##independent_w3##republican_w3 correction inoculation, robust
est store AZmaricopa_w4_party 
reg AZmaricopa_w4 factcheck##ib1.trumpq correction inoculation, robust
est store AZmaricopa_w4_trump
reg AZmaricopa_w4 factcheck##correction##inoculation, robust
est store AZmaricopa_w4_w1treatment 

estout AZmaricopa_w4_party AZmaricopa_w4_trump AZmaricopa_w4_w1treatment using "AZMaricopa_w4_interactions_noc.tex", label style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** 0.005) 

reg AZgov_rightful factcheck_w4 correction inoculation, robust
reg AZgov_rightful factcheck##independent_w3##republican_w3 correction inoculation, robust
est store AZgov_rightful_party
reg AZgov_rightful factcheck##ib1.trumpq correction inoculation, robust
est store AZgov_rightful_trump
reg AZgov_rightful factcheck##correction##inoculation, robust
est store AZgov_rightful_w1treatment

estout AZgov_rightful_party AZgov_rightful_trump AZgov_rightful_w1treatment using "AZgov_rightful_interactions_noc.tex", label style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** 0.005) 

reg confidence_2022_w4_post factcheck_w4 correction inoculation, robust
reg confidence_2022_w4_post factcheck##independent_w3##republican_w3 correction inoculation, robust
est store conf2022w4postparty
reg confidence_2022_w4_post factcheck##ib1.trumpq correction inoculation, robust
est store conf2022w4posttrump
reg confidence_2022_w4_post factcheck##ib3.conf2022q correction inoculation, robust
est store conf2022w4postpre
reg confidence_2022_w4_post factcheck##correction##inoculation, robust
est store conf2022w4postw1treat

estout conf2022w4post* using "confidence_2022_w4_post_interactions_noc.tex", label style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** 0.005) 

reg seats_won_fraud_2022_w4_post factcheck_w4 correction inoculation, robust
reg seats_won_fraud_2022_w4_post factcheck##independent_w3##republican_w3 correction inoculation, robust
est store seats_fraud_2022_party
reg seats_won_fraud_2022_w4_post factcheck##ib1.trumpq correction inoculation, robust
est store seats_fraud_2022_trump
reg seats_won_fraud_2022_w4_post factcheck##ib1.seats_won_fraud_2022_w3 correction inoculation, robust
est store seats_fraud_2022_pre
reg seats_won_fraud_2022_w4_post factcheck##correction##inoculation, robust
est store seats_fraud_2022_w1treat

estout seats_fraud_2022* using "seats_won_fraud_2022_w4_post_interactions_noc.tex", label style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** 0.005) 

reg confidence_2020_w4_post factcheck_w4 correction inoculation, robust
reg confidence_2020_w4_post factcheck##independent_w3##republican_w3 correction inoculation, robust
est store conf_2020_party
reg confidence_2020_w4_post factcheck##ib1.trumpq correction inoculation, robust
est store conf_2020_trump
reg confidence_2020_w4_post factcheck##ib3.conf2020q correction inoculation, robust
est store conf_2020_pre
reg confidence_2020_w4_post factcheck##correction##inoculation, robust
est store conf_2020_w1treat

estout conf_2020_* using "confidence_2020_w4_post_interactions_noc.tex", label style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** 0.005) 

reg fraud2020w4_post factcheck_w4 correction inoculation, robust
reg fraud2020w4_post factcheck##independent_w3##republican_w3 correction inoculation, robust
est store fraud2020w4_post_party
reg fraud2020w4_post factcheck##ib1.trumpq correction inoculation, robust
est store fraud2020w4_post_trump
reg fraud2020w4_post factcheck##ib1.fraud2020q_w3 correction inoculation, robust
est store fraud2020w4_post_pre
reg fraud2020w4_post factcheck##correction##inoculation, robust
est store fraud2020w4_post_w1treat 

estout fraud2020w4_post* using "fraud2020w4_post_interactions_noc.tex", label style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** 0.005) 

reg seats_won_fraud_2020_w4_post factcheck_w4 correction inoculation, robust
reg seats_won_fraud_2020_w4_post factcheck##independent_w3##republican_w3 correction inoculation, robust
est store seats2020w4post_party
reg seats_won_fraud_2020_w4_post factcheck##ib1.trumpq correction inoculation, robust
est store seats2020w4post_trump
reg seats_won_fraud_2020_w4_post factcheck##ib1.seats_won_fraud_2020_w3 correction inoculation, robust
est store seats2020w4post_post_pre
reg seats_won_fraud_2020_w4_post factcheck##correction##inoculation, robust
est store seats2020w4post_w1treat 

estout seats2020w4post* using "seats_won_fraud_2020_w4_post_interactions_noc.tex", label style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** 0.005) 

drop _merge
save "2022w2.dta", replace

*************
*2022 WAVE 3*
*************

clear
use "DART0053_W3_OUTPUT.dta"

*A typo was reported by a survey respondent in the experimental stimuli ("prevent the integrity" instead of "protect the integrity"). YouGov corrected this language in both the prebunking with inoculation and with no inoculation conditions after 70 participants had completed the study. We will therefore exclude the first 70 participants to take part in the study from all analyses of the data.

sort starttime
drop if _n<71

rename caseid caseid_orig
rename caseid_Dart0053_W1 caseid 
merge 1:1 caseid using "2022w1.dta"
tab _merge

drop condition_treat_w1

tab cond _merge, row chi2 /*no evidence of differential attrition*/

drop if _merge==2
drop _merge

merge 1:1 caseid using "2022w2.dta",keepusing(fact_check_treat factcheck_w4 AZmaricopa_w4 AZgov_rightful_w4 factcheck_w4 confidence_2020_w4_post confidence_2022_w4_post seats_won_fraud_2022_w4_post)
tab _merge

tab fact_check_treat _merge, chi2 row /*no evidence of differential attrition*/
drop if _merge==2

*The variables above pertain to condition assignment in Waves 1 and 2. For Wave 3, we will create a prebunking with inoculation treatment assignment variable that takes the value of 1 for respondents who are assigned to the prebunking with inoculation treatment condition and 0 otherwise and a prebunking with no inoculation treatment variable that takes the value of 1 for respondents who are assigned to the prebunking with no inoculation treatment condition and 0 otherwise.

gen prebunking_inoc=(condition_treat==2)
gen prebunking_no_inoc=(condition_treat==1)

***Outcome Vars - PRE-TREATMENT***

*How many seats will be won by fraud in 2022*
tab Q22b_w5 
rename Q22b_w5 seats_won_fraud_2022_w5
label var seats_won_fraud_2022_w5 "Number of Seats Will be Won b/c Fraud 2022 - W5 PRE"
codebook seats_won_fraud_2022_w5

*How many seats will be won by fraud in 2024*
tab Q22c_w5 
rename Q22c_w5 seats_won_fraud_2024_w5
label var seats_won_fraud_2024_w5 "Number of Seats Will be Won b/c Fraud 2024 - W5 PRE"
codebook seats_won_fraud_2024_w5

*2022 confidence

*Confidence your vote will be counted as intended: four-point scale from very confident (4) to not at all confident (1).
tab Q22a_1_w5
rename Q22a_1_w5 conf_yrvote_2022_w5
label var conf_yrvote_2022_w5 "Confidence Your Vote Will Be Counted as Intended 2022 - w5 - PRE"
codebook conf_yrvote_2022_w5

*Confidence votes locally will be counted as voters intended: four-point scale from very confident (4) to not at all confident (1).
tab Q22a_2_w5
rename Q22a_2_w5 conf_locvote_2022_w5
label var conf_locvote_2022_w5 "Confidence Votes Locally Will Be Counted as Intended 2022 - w5 - PRE"
codebook conf_locvote_2022_w5

*Confidence votes statewide will be counted as voters intended: four-point scale from very confident (4) to not at all confident (1).
tab Q22a_3_w5
rename Q22a_3_w5 conf_stvote_2022_w5
label var conf_stvote_2022_w5 "Confidence Votes in State Will Be Counted as Intended 2022 - w5 - PRE"
codebook conf_stvote_2022_w5

*Confidence votes nationwide will be counted as voters intended: four-point scale from very confident (4) to not at all confident (1).
tab Q22a_4_w5
rename Q22a_4_w5 conf_natlvote_2022_w5
label var conf_natlvote_2022_w5 "Confidence Votes Nationally Counted as Intended 2022 - w5 - PRE"
codebook conf_natlvote_2022_w5

*Confidence in 2022 election scale: Mean of responses to four items (each measured 4=very confident to 1=not at all confident):
*-Your vote
*-Votes locally
*-Votes in your state
*-Votes nationwide
egen confidence_2022_w5=rowmean(conf_yrvote_2022_w5 conf_locvote_2022_w5 conf_stvote_2022_w5 conf_natlvote_2022_w5)

factor conf_yrvote_2022_w5 conf_locvote_2022_w5 conf_stvote_2022_w5 conf_natlvote_2022_w5, pcf

*2022 fraud

tab Q42h_1_w5
vreverse Q42h_1_w5, gen(vf_22_doublevoting_w5)
label var vf_22_doublevoting_w5 "2022 VF Frequency - Double Voting - w5 - PRE"
codebook vf_22_doublevoting_w5

tab Q42h_2_w5
vreverse Q42h_2_w5, gen(vf_22_stealballots_w5)
label var vf_22_stealballots_w5 "2022 VF Frequency - Stealing/Tampering Ballots - w5 - PRE"
codebook vf_22_stealballots_w5

tab Q42h_3_w5
vreverse Q42h_3_w5, gen(vf_22_voterimpers_w5)
label var vf_22_voterimpers_w5 "2022 VF Frequency - Voter Impersonation - w5 - PRE"
codebook vf_22_voterimpers_w5

tab Q42h_4_w5
vreverse Q42h_4_w5, gen(vf_22_noncitz_voting_w5)
label var vf_22_noncitz_voting_w5 "2022 VF Frequency - Non-Citizen Voting - w5 - PRE"
codebook vf_22_noncitz_voting_w5

tab Q42h_5_w5
vreverse Q42h_5_w5, gen(vf_22_abstfraud_w5)
label var vf_22_abstfraud_w5 "2022 VF Frequency - Absentee Ballot Fraud - w5 - PRE"
codebook vf_22_abstfraud_w5
	
tab Q42h_6_w5
vreverse Q42h_6_w5, gen(vf_22_offic_fraud_w5)
label var vf_22_offic_fraud_w5 "2022 VF Frequency - Officials Preventing Absentee Vote - w5 - PRE"
codebook vf_22_offic_fraud_w5

*Voter fraud in 2022 beliefs Frequency scale: Mean of responses to six items (each measured 7=a million or more to 1=less than ten):
*-Voting more than once in an election.
*-Stealing or tampering with ballots.
*-Pretending to be someone else when voting.
*-People voting who are not U.S. citizens.
*-Voting with an absentee ballot intended for another person.
*-Officials preventing absentee voters from voting.
egen fraud2022w5_pre=rowmean(vf_22_doublevoting_w5 vf_22_stealballots_w5 vf_22_voterimpers_w5 vf_22_noncitz_voting_w5 vf_22_abstfraud_w5 vf_22_offic_fraud_w5)
codebook fraud2022w5_pre

factor vf_22_doublevoting_w5 vf_22_stealballots_w5 vf_22_voterimpers_w5 vf_22_noncitz_voting_w5 vf_22_abstfraud_w5 vf_22_offic_fraud_w5, pcf

/* Maricopa County

On Election Day, a printing malfunction took place at about one-quarter of the polling places in Maricopa County, the most populous county in Arizona. This problem stopped some ballots from being counted onsite.
 
Please indicate whether you believe the following statement is accurate or not.
Only voting sites in conservative areas in Arizona's Maricopa County experienced issues with tabulating ballots on Election Day. */

*Statement/answer categories are worded such that saying "accurate" is a misperception, so coding is flipped so that the a fact-checking intervention that works would be negative (it reduces misperceptions) to avoid weird conflation of accuracy of underlying claim with "accurate" in answer categories 

gen AZmaricopa_w5=Q44_w5
recode AZmaricopa_w5 (4=1) (3=2) (2=3) (1=4)

/* Katie Hobbs won due to fraud */

*In the election for Arizona governor, Katie Hobbs, the Democrat, defeated Kari Lake, the Republican, due to election fraud and is NOT the rightful winner.

*Statement/answer categories are worded such that saying "agree" is a misperception, so coding is flipped so that the a fact-checking intervention that works would be negative (it reduces misperceptions) to be avoid switching signs from previous question 

gen AZgov_rightful_w5=Q45_w5
recode AZgov_rightful_w5 (4=1) (3=2) (2=3) (1=4)

*2024 confidence

*Confidence your vote will be counted as intended: four-point scale from very confident (4) to not at all confident (1).
tab Q42a_1_w5
rename Q42a_1_w5 conf_yrvote_2024_w5
label var conf_yrvote_2024_w5 "Confidence Your Vote Will Be Counted as Intended 2024 - w5 - PRE"
codebook conf_yrvote_2024_w5

*Confidence votes locally will be counted as voters intended: four-point scale from very confident (4) to not at all confident (1).
tab Q42a_2_w5
rename Q42a_2_w5 conf_locvote_2024_w5
label var conf_locvote_2024_w5 "Confidence Votes Locally Will Be Counted as Intended 2024 - w5 - PRE"
codebook conf_locvote_2024_w5

*Confidence votes statewide will be counted as voters intended: four-point scale from very confident (4) to not at all confident (1).
tab Q42a_3_w5
rename Q42a_3_w5 conf_stvote_2024_w5
label var conf_stvote_2024_w5 "Confidence Votes in State Will Be Counted as Intended 2024 - w5 - PRE"
codebook conf_stvote_2024_w5

*Confidence votes nationwide will be counted as voters intended: four-point scale from very confident (4) to not at all confident (1).
tab Q42a_4_w5
rename Q42a_4_w5 conf_natlvote_2024_w5
label var conf_natlvote_2024_w5 "Confidence Votes Nationally Counted as Intended 2024 - w5 - PRE"
codebook conf_natlvote_2024_w5

*Confidence in 2024 election scale: Mean of responses to four items (each measured 4=very confident to 1=not at all confident):
*-Your vote
*-Votes locally
*-Votes in your state
*-Votes nationwide
egen confidence_2024_w5=rowmean(conf_yrvote_2024_w5 conf_locvote_2024_w5 conf_stvote_2024_w5 conf_natlvote_2024_w5)

factor conf_yrvote_2024_w5 conf_locvote_2024_w5 conf_stvote_2024_w5 conf_natlvote_2024_w5, pcf

*2024 fraud
tab Q42d_1_w5
vreverse Q42d_1_w5, gen(vf_24_doublevoting_w5)
label var vf_24_doublevoting_w5 "2024 VF Frequency - Double Voting - w5 - PRE"
codebook vf_24_doublevoting_w5

tab Q42d_2_w5
vreverse Q42d_2_w5, gen(vf_24_stealballots_w5)
label var vf_24_stealballots_w5 "2024 VF Frequency - Stealing/Tampering Ballots - w5 - PRE"
codebook vf_24_stealballots_w5

tab Q42d_3_w5
vreverse Q42d_3_w5, gen(vf_24_voterimpers_w5)
label var vf_24_voterimpers_w5 "2024 VF Frequency - Voter Impersonation - w5 - PRE"
codebook vf_24_voterimpers_w5

tab Q42d_4_w5
vreverse Q42h_4_w5, gen(vf_24_noncitz_voting_w5)
label var vf_24_noncitz_voting_w5 "2024 VF Frequency - Non-Citizen Voting - w5 - PRE"
codebook vf_24_noncitz_voting_w5

tab Q42d_5_w5
vreverse Q42d_5_w5, gen(vf_24_abstfraud_w5)
label var vf_24_abstfraud_w5 "2024 VF Frequency - Absentee Ballot Fraud - w5 - PRE"
codebook vf_24_abstfraud_w5
	
tab Q42d_6_w5
vreverse Q42d_6_w5, gen(vf_24_offic_fraud_w5)
label var vf_24_offic_fraud_w5 "2024 VF Frequency - Officials Preventing Absentee Vote - w5 - PRE"
codebook vf_24_offic_fraud_w5

*Voter fraud in 2024 beliefs Frequency scale: Mean of responses to six items (each measured 7=a million or more to 1=less than ten):
*-Voting more than once in an election.
*-Stealing or tampering with ballots.
*-Pretending to be someone else when voting.
*-People voting who are not U.S. citizens.
*-Voting with an absentee ballot intended for another person.
*-Officials preventing absentee voters from voting.
egen fraud2024w5_pre=rowmean(vf_24_doublevoting_w5 vf_24_stealballots_w5 vf_24_voterimpers_w5 vf_24_noncitz_voting_w5 vf_24_abstfraud_w5 vf_24_offic_fraud_w5)
codebook fraud2024w5_pre

factor vf_24_doublevoting_w5 vf_24_stealballots_w5 vf_24_voterimpers_w5 vf_24_noncitz_voting_w5 vf_24_abstfraud_w5 vf_24_offic_fraud_w5, pcf

*Belief in targeted false claims (each measured on a scale from 1=not at all accurate to 4=very accurate):

*-More votes in one contest than other contests on the ballot means that results cannot be trusted. 

vreverse Q43_1_w5, gen(targeted_false1_w5_pre)

*-If results as reported on election night change over the ensuing days or weeks, the process is hacked or compromised. 

vreverse Q43_2_w5, gen(targeted_false2_w5_pre)

*DEVIATION/NOT SPECIFIED IN PREREG EXPLICITLY
egen targeted_false_w5_pre=rowmean(targeted_false1_w5_pre targeted_false2_w5_pre)

*non-targeted false claims
*-Votes are regularly being cast on behalf of dead people. ***WORDING UPDATED FROM PREREG

vreverse Q43_3_w5, gen(non_targeted_false1_w5_pre)

*-Voting system software is not reviewed or tested and can be easily manipulated. 

vreverse Q43_4_w5, gen(non_targeted_false2_w5_pre)

*-If there are problems with voting machines at a voting site, the votes from that site will not be counted. 

vreverse Q43_5_w5, gen(non_targeted_false3_w5_pre)

*-Poll workers intentionally give specific writing instruments, such as Sharpies, only to specific voters to cause their ballots to be rejected.

vreverse Q43_6_w5, gen(non_targeted_false4_w5_pre)

egen non_targeted_false_w5_pre=rowmean(non_targeted_false1_w5_pre non_targeted_false2_w5_pre non_targeted_false3_w5_pre non_targeted_false4_w5_pre)
 
*targeted true claims
*-Procedures for casting and counting ballots prevent election officials from knowing which candidates an individual voted for. ***REPLACED PER PREREG UPDATE

vreverse Q43_7_w5, gen(targeted_true1_w5_pre)

*-Ballot handling procedures protect against intentional or unintentional ballot destruction and related tampering. 

vreverse Q43_8_w5, gen(targeted_true2_w5_pre)

egen targeted_true_w5_pre=rowmean(targeted_true1_w5_pre targeted_true2_w5_pre)

*non-targeted true claims
*-Robust safeguards protect against tampering with ballots returned via drop box. 

vreverse Q43_9_w5, gen(non_targeted_true1_w5_pre)

*-Safeguards protect the integrity of the mail-in/absentee ballot process.

vreverse Q43_10_w5, gen(non_targeted_true2_w5_pre)

*-Legal protections guard against the removal of eligible voters during updates of registration lists by election officials.***WORDING UPDATED FROM PREREG

vreverse Q43_11_w5, gen(non_targeted_true3_w5_pre)

*-Voters are protected by state and federal law from threats or intimidation at the polls, including from election observers.

vreverse Q43_12_w5, gen(non_targeted_true4_w5_pre)

egen nontargeted_true_w5_pre=rowmean(non_targeted_true1_w5_pre non_targeted_true2_w5_pre non_targeted_true3_w5_pre non_targeted_true4_w5_pre)

gen discernment_pre=targeted_true_w5_pre-targeted_false_w5_pre

***Outcome Vars - POST-TREATMENT***

*2022 confidence
*Confidence your vote will be counted as intended: four-point scale from very confident (4) to not at all confident (1).
tab Q42e_1_w5
rename Q42e_1_w5 conf_yrvote_2022_w5_post
label var conf_yrvote_2022_w5_post "Confidence Your Vote Will Be Counted as Intended 2022 - w5 - POST"
codebook conf_yrvote_2022_w5_post

*Confidence votes locally will be counted as voters intended: four-point scale from very confident (4) to not at all confident (1).
tab Q42e_2_w5
rename Q42e_2_w5 conf_locvote_2022_w5_post
label var conf_locvote_2022_w5_post "Confidence Votes Locally Will Be Counted as Intended 2022 - w5 - POST"
codebook conf_locvote_2022_w5_post

*Confidence votes statewide will be counted as voters intended: four-point scale from very confident (4) to not at all confident (1).
tab Q42e_3_w5
rename Q42e_3_w5 conf_stvote_2022_w5_post
label var conf_stvote_2022_w5_post "Confidence Votes in State Will Be Counted as Intended 2022 - w5 - POST"
codebook conf_stvote_2022_w5_post

*Confidence votes nationwide will be counted as voters intended: four-point scale from very confident (4) to not at all confident (1).
tab Q42e_4_w5
rename Q42e_4_w5 conf_natlvote_2022_w5_post
label var conf_natlvote_2022_w5_post "Confidence Votes Nationally Will Be Counted as Intended 2022 - w5 - POST"
codebook conf_natlvote_2022_w5_post

*Confidence in 2022 election scale: Mean of responses to four items (each measured 4=very confident to 1=not at all confident):
*-Your vote
*-Votes locally
*-Votes in your state
*-Votes nationwide
egen confidence_2022_w5_post=rowmean(conf_yrvote_2022_w5_post conf_locvote_2022_w5_post conf_stvote_2022_w5_post conf_natlvote_2022_w5_post)

factor conf_yrvote_2022_w5_post conf_locvote_2022_w5_post conf_stvote_2022_w5_post conf_natlvote_2022_w5_post, pcf

*Voter Fraud 2022 Beliefs Frequency Scale - 2022 w5
/*Voter fraud in 2022 beliefs Frequency scale: Mean of responses to six items (each measured 7=a million or more to 1=less than ten):
-Voting more than once in an election.
-Stealing or tampering with ballots.
-Pretending to be someone else when voting.
-People voting who are not U.S. citizens.
-Voting with an absentee ballot intended for another person.
-Officials preventing absentee voters from voting.*/
tab Q42f_1_w5
vreverse Q42f_1_w5, gen(vf_22_doublevoting_w5_post)
label var vf_22_doublevoting_w5_post "2022 VF Frequency - Double Voting - w5 - POST"
codebook vf_22_doublevoting_w5_post

tab Q42f_2_w5
vreverse Q42f_2_w5, gen(vf_22_stealballots_w5_post)
label var vf_22_stealballots_w5_post "2022 VF Frequency - Stealing/Tampering Ballots - w5 - POST"
codebook vf_22_stealballots_w5_post

tab Q42f_3_w5
vreverse Q42f_3_w5, gen(vf_22_voterimpers_w5_post)
label var vf_22_voterimpers_w5_post "2022 VF Frequency - Voter Impersonation - w5 - POST"
codebook vf_22_voterimpers_w5_post

tab Q42f_4_w5
vreverse Q42f_4_w5, gen(vf_22_noncitz_voting_w5_post)
label var vf_22_noncitz_voting_w5_post "2022 VF Frequency - Non-Citizen Voting - w5 - POST"
codebook vf_22_noncitz_voting_w5_post

tab Q42f_5_w5
vreverse Q42f_5_w5, gen(vf_22_abstfraud_w5_post)
label var vf_22_abstfraud_w5_post "2022 VF Frequency - Absentee Ballot Fraud - w5 - POST"
codebook vf_22_abstfraud_w5_post
	
tab Q42f_6_w5
vreverse Q42f_6_w5, gen(vf_22_offic_fraud_w5_post)
label var vf_22_offic_fraud_w5_post "2022 VF Frequency - Officials Preventing Absentee Vote - w5 - POST"
codebook vf_22_offic_fraud_w5_post

*Voter fraud in 2022 beliefs Frequency scale: Mean of responses to six items (each measured 7=a million or more to 1=less than ten):
*-Voting more than once in an election.
*-Stealing or tampering with ballots.
*-Pretending to be someone else when voting.
*-People voting who are not U.S. citizens.
*-Voting with an absentee ballot intended for another person.
*-Officials preventing absentee voters from voting.
egen fraud2022w5_post=rowmean(vf_22_doublevoting_w5_post vf_22_stealballots_w5_post vf_22_voterimpers_w5_post vf_22_noncitz_voting_w5_post vf_22_abstfraud_w5_post vf_22_offic_fraud_w5_post)
codebook fraud2022w5_post 

factor vf_22_doublevoting_w5_post vf_22_stealballots_w5_post vf_22_voterimpers_w5_post vf_22_noncitz_voting_w5_post vf_22_abstfraud_w5_post vf_22_offic_fraud_w5_post, pcf

*How many seats won by fraud in 2022*/
tab Q48b_w5 
rename Q48b_w5 seats_won_fraud_2022_w5_post
label var seats_won_fraud_2022_w5_post "Number of Seats Won b/c Fraud 2022 - POST"
codebook seats_won_fraud_2022_w5_post

*2024 confidence

*Confidence your vote counted as intended: four-point scale from very confident (4) to not at all confident (1).
tab Q42b_1_w5
rename Q42b_1_w5 conf_yrvote_w5_post
label var conf_yrvote_w5_post "Confidence Your Vote Counted as Intended 2024 - w5 - POST"
codebook conf_yrvote_w5_post

*Confidence votes locally counted as voters intended: four-point scale from very confident (4) to not at all confident (1).
tab Q42b_2_w5
rename Q42b_2_w5 conf_locvote_w5_post
label var conf_locvote_w5_post "Confidence Votes Locally Counted as Intended 2024 - w5 - POST"
codebook conf_locvote_w5_post

*Confidence votes nationwide counted as voters intended: four-point scale from very confident (4) to not at all confident (1).
tab Q42b_3_w5
rename Q42b_3_w5 conf_stvote_w5_post
label var conf_stvote_w5_post "Confidence Votes in State Counted as Intended 2024 - w5 - POST"
codebook conf_stvote_w5_post

*Confidence votes nationwide counted as voters intended: four-point scale from very confident (4) to not at all confident (1).
tab Q42b_4_w5
rename Q42b_4_w5 conf_natlvote_w5_post
label var conf_natlvote_w5_post "Confidence Votes Nationally Counted as Intended 2024 - w5 - POST"
codebook conf_natlvote_w5_post

*Confidence in 2024 election scale: Mean of responses to four items (each measured 4=very confident to 1=not at all confident):
*-Your vote
*-Votes locally
*-Votes in your state
*-Votes nationwide
egen confidence_2024_w5_post=rowmean(conf_yrvote_w5_post conf_locvote_w5_post conf_stvote_w5_post conf_natlvote_w5_post)

factor conf_yrvote_w5_post conf_locvote_w5_post conf_stvote_w5_post conf_natlvote_w5_post, pcf

*Voter Fraud 2024 Beliefs Frequency Scale - 2024 w5
/*Voter fraud in 2024 beliefs frequency scale: Mean of responses to six items (each measured 7=a million or more to 1=less than ten):
-Voting more than once in an election.
-Stealing or tampering with ballots.
-Pretending to be someone else when voting.
-People voting who are not U.S. citizens.
-Voting with an absentee ballot intended for another person.
-Officials preventing absentee voters from voting.*/
tab Q42g_1_w5
vreverse Q42g_1_w5, gen(vf_24_doublevoting_w5_post)
label var vf_24_doublevoting_w5_post "2024 VF FreQuency - Double Voting - w5 - POST"
codebook vf_24_doublevoting_w5_post

tab Q42g_2_w5
vreverse Q42g_2_w5, gen(vf_24_stealballots_w5_post)
label var vf_24_stealballots_w5_post "2024 VF FreQuency - Stealing/Tampering Ballots - w5 - POST"
codebook vf_24_stealballots_w5_post

tab Q42g_3_w5
vreverse Q42g_3_w5, gen(vf_24_voterimpers_w5_post)
label var vf_24_voterimpers_w5_post "2024 VF FreQuency - Voter Impersonation - w5 - POST"
codebook vf_24_voterimpers_w5_post

tab Q42g_4_w5
vreverse Q42g_4_w5, gen(vf_24_noncitz_voting_w5_post)
label var vf_24_noncitz_voting_w5_post "2024 VF FreQuency - Non-Citizen Voting - w5 - POST"
codebook vf_24_noncitz_voting_w5_post

tab Q42g_5_w5
vreverse Q42g_5_w5, gen(vf_24_abstfraud_w5_post)
label var vf_24_abstfraud_w5_post "2024 VF FreQuency - Absentee Ballot Fraud - w5 - POST"
codebook vf_24_abstfraud_w5_post
	
tab Q42g_6_w5
vreverse Q42g_6_w5, gen(vf_24_offic_fraud_w5_post)
label var vf_24_offic_fraud_w5_post "2024 VF FreQuency - Officials Preventing Absentee Vote - w5 - POST"
codebook vf_24_offic_fraud_w5_post

*Voter fraud in 2024 beliefs frequency scale: Mean of responses to six items (each measured 7=a million or more to 1=less than ten):
*-Voting more than once in an election.
*-Stealing or tampering with ballots.
*-Pretending to be someone else when voting.
*-People voting who are not U.S. citizens.
*-Voting with an absentee ballot intended for another person.
*-Officials preventing absentee voters from voting.
egen fraud2024w5_post=rowmean(vf_24_doublevoting_w5_post vf_24_stealballots_w5_post vf_24_voterimpers_w5_post vf_24_noncitz_voting_w5_post vf_24_abstfraud_w5_post vf_24_offic_fraud_w5_post)
codebook fraud2024w5_post 

factor vf_24_doublevoting_w5_post vf_24_stealballots_w5_post vf_24_voterimpers_w5_post vf_24_noncitz_voting_w5_post vf_24_abstfraud_w5_post vf_24_offic_fraud_w5_post, pcf

*How many seats will be won by fraud in 2024*
tab Q48c_w5 
rename Q48c_w5 seats_won_fraud_2024_w5_post
label var seats_won_fraud_2024_w5_post "Number of Seats Will Be Won b/c Fraud 2024 - POST"
codebook seats_won_fraud_2024_w5_post

*accuracy items

*Belief in targeted false claims (each measured on a scale from 1=not at all accurate to 4=very accurate):

*-More votes in one contest than other contests on the ballot means that results cannot be trusted. 

vreverse Q45_1_w5, gen(targeted_false1_w5_post)

*-If results as reported on election night change over the ensuing days or weeks, the process is hacked or compromised. 

vreverse Q45_2_w5, gen(targeted_false2_w5_post)

*DEVIATION/NOT SPECIFIED IN PREREG EXPLICITLY
egen targeted_false_w5_post=rowmean(targeted_false1_w5_post targeted_false2_w5_post)

*non-targeted false claims
*-Votes are regularly being cast on behalf of dead people. ***WORDING UPDATED FROM PREREG

vreverse Q45_3_w5, gen(non_targeted_false1_w5_post)

*-Voting system software is not reviewed or tested and can be easily manipulated. 

vreverse Q45_4_w5, gen(non_targeted_false2_w5_post)

*-If there are problems with voting machines at a voting site, the votes from that site will not be counted. 

vreverse Q45_5_w5, gen(non_targeted_false3_w5_post)

*-Poll workers intentionally give specific writing instruments, such as Sharpies, only to specific voters to cause their ballots to be rejected.

vreverse Q45_6_w5, gen(non_targeted_false4_w5_post)

egen non_targeted_false_w5_post=rowmean(non_targeted_false1_w5_post non_targeted_false2_w5_post non_targeted_false3_w5_post non_targeted_false4_w5_post)
 
*targeted true claims
*-Procedures for casting and counting ballots prevent election officials from knowing which candidates an individual voted for. ***REPLACED PER PREREG UPDATE

vreverse Q45_7_w5, gen(targeted_true1_w5_post)

*-Ballot handling procedures protect against intentional or unintentional ballot destruction and related tampering. 

vreverse Q45_8_w5, gen(targeted_true2_w5_post)

egen targeted_true_w5_post=rowmean(targeted_true1_w5_post targeted_true2_w5_post)

*non-targeted true claims
*-Robust safeguards protect against tampering with ballots returned via drop box. 

vreverse Q45_9_w5, gen(non_targeted_true1_w5_post)

*-Safeguards protect the integrity of the mail-in/absentee ballot process.

vreverse Q45_10_w5, gen(non_targeted_true2_w5_post)

*-Legal protections guard against the removal of eligible voters during updates of registration lists by election officials.***WORDING UPDATED FROM PREREG

vreverse Q45_11_w5, gen(non_targeted_true3_w5_post)

*-Voters are protected by state and federal law from threats or intimidation at the polls, including from election observers.

vreverse Q45_12_w5, gen(non_targeted_true4_w5_post)

egen nontargeted_true_w5_post=rowmean(non_targeted_true1_w5_post non_targeted_true2_w5_post non_targeted_true3_w5_post non_targeted_true4_w5_post)

*attention checks
gen attention1_w5=(Q21c_6_w3==4 | Q21c_6_w3==5)
gen attention2_w5=(Q21d_2_w3==4 | Q21d_2_w3==5)
tab attention1_w5 attention2_w5, cell /*91% passed both, 7% failed one, 1% failed both*/

gen pass_attention_w5=(attention1_w5==1 & attention2_w5==1)

*demos
tab educ
tab gender
tab pid7
tab race
su birthyr, detail

drop agegroup noncollege party3 

gen agegroup=.
replace agegroup=1 if age1834==1
replace agegroup=2 if age3544==1
replace agegroup=3 if age4554==1
replace agegroup=4 if age5564==1
replace agegroup=5 if age65plus==1

label drop agelab
label def agelab 1 "18-34" 2 "35-44" 3 "45-54" 4 "55-64" 5 "65+"
label val agegroup agelab

gen noncollege=(educ<5) if educ!=.

label drop noncollegelab
label def noncollegelab 0 "College degree" 1 "No college degree"
label val noncollege noncollegelab

label drop nonwhitelab
label def nonwhitelab 0 "White" 1 "Non-white"
label val nonwhite_w3 nonwhitelab

gen party3=.
replace party3=1 if pid7<4
replace party3=2 if pid7==4 | pid7==8
replace party3=3 if pid7>4 & pid7<8

label drop partylab
label def partylab 1 "Democrat" 2 "Independent" 3 "Republican"
label val party3 partylab

gen condition_w5=0
replace condition_w5=1 if prebunking_inoc==1
replace condition_w5=2 if prebunking_no_inoc==1

dtable i.gender i.agegroup i.noncollege i.nonwhite_w3 i.party3, by(condition_w5) export(study3-descriptives.tex, replace) fvlabel

*EXPLORATORY - EFFECTS OF WAVE 1 INTERVENTIONS ON PRE-TREATMENT W3 OUTCOMES

quietly lasso linear confidence_2022_w5 college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre targeted_false_w5_pre discernment_pre, rseed(1234)
local confidence_2022_w5_ctl=e(allvars_sel) 

reg confidence_2022_w5 correction inoculation `confidence_2022_w5_ctl', robust
lincom correction-inoculation

quietly lasso linear confidence_2024_w5 college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre targeted_false_w5_pre discernment_pre, rseed(1234)
local confidence_2024_w5_ctl=e(allvars_sel) 

preserve

rename confidence_2022_w3_post conf1
rename confidence_2022_w4_post conf2 /*fails here - not merging wave 4 data in?*/
rename confidence_2022_w5 conf3

reshape long conf, i(caseid) j(wave)

reg conf correction##wave inoculation##wave `confidence_2022_w3_pst_ctl', cluster(caseid) /*add wave 3 controls*/
est store conf22_wavediff

restore

preserve

rename seats_won_fraud_2022_w3_post seats1
rename seats_won_fraud_2022_w4_post seats2 
rename seats_won_fraud_2022_w5_post seats3

reshape long seats, i(caseid) j(wave)

reg seats correction##wave inoculation##wave `seats_won_fraud_2022_w3_pst_ctl', cluster(caseid) /*add wave 3 controls*/
est store seats22_wavediff

restore

estout biden_wavediff conf20_wavediff conf22_wavediff fraud_wavediff seats20_wavediff seats22_wavediff using "wavediffmodels.tex", label style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** .005) 

estout biden_wavediff conf20_wavediff conf22_wavediff fraud_wavediff seats20_wavediff seats22_wavediff using "wavediffmodels-highprecision.tex", label style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.5f)) se(par fmt(%9.5f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** .005) 

reg confidence_2024_w5 correction inoculation `confidence_2024_w5_ctl', robust
lincom correction-inoculation

quietly lasso linear seats_won_fraud_2022_w5 college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre targeted_false_w5_pre discernment_pre, rseed(1234)
local seats_won_fraud_2022_w5_ctl=e(allvars_sel) 

reg seats_won_fraud_2022_w5 correction inoculation `seats_won_fraud_2022_w5_ctl', robust
lincom correction-inoculation

quietly lasso linear seats_won_fraud_2024_w5 college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre targeted_false_w5_pre discernment_pre, rseed(1234)
local seats_won_fraud_2024_w5_ctl=e(allvars_sel) 

reg seats_won_fraud_2024_w5 correction inoculation `seats_won_fraud_2024_w5_ctl', robust
lincom correction-inoculation

quietly lasso linear fraud2022w5_pre college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre targeted_false_w5_pre discernment_pre, rseed(1234)
local fraud2022w5_pre_ctl=e(allvars_sel) 

reg fraud2022w5_pre correction inoculation `fraud2022w5_pre_ctl', robust
lincom correction-inoculation

quietly lasso linear fraud2024w5_pre college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre targeted_false_w5_pre discernment_pre, rseed(1234)
local fraud2024w5_pre_ctl=e(allvars_sel) 

reg fraud2024w5_pre correction inoculation `fraud2024w5_pre_ctl', robust
lincom correction-inoculation

*NOTE: controlling for wave 2 condition will omit 22 who missed w2 in all below

*H4: Exposure to a prebunking correction will increase confidence in the 2022 and 2024 elections and reduce beliefs about the prevalence and effects of fraud (Frequency of voter fraud and the number of seats changed by fraud) in the 2022 and 2024 election compared to the placebo condition regardless of whether the prebunking correction is preceded by instructions alerting participants that they might be exposed to misinformation in the future.

*RQ6: Will exposure to a prebunking correction preceded by instructions alerting participants that they might be exposed to misinformation in the future increase confidence in the 2022 and 2024 elections and reduce beliefs about the prevalence and effects of fraud (Frequency of voter fraud and the number of seats changed by fraud) in the 2022 and 2024 election compared to exposure to the same correction material without the preceding instructions?

*2022 confidence = B0 + B1*w3_prebunk_inst + B2*w3_prebunk_no_inst + B3*w2_correction + B4*w1_correction + B5*w1_inoculation + quietly lasso controls
*lincom B1-B2

quietly lasso linear confidence_2022_w5_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre targeted_false_w5_pre discernment_pre, rseed(1234)
local confidence_2022_w5_post_ctl=e(allvars_sel) 

reg confidence_2022_w5_post prebunking_inoc prebunking_no_inoc correction inoculation factcheck_w4 `confidence_2022_w5_post_ctl', robust
lincom prebunking_inoc-prebunking_no_inoc
lincom correction-inoculation
est store conf22

reg confidence_2022_w5_post prebunking_inoc prebunking_no_inoc correction inoculation factcheck_w4 confidence_2022_w3, robust
lincom prebunking_inoc-prebunking_no_inoc
lincom correction-inoculation
est store conf22_ldv

reg confidence_2022_w5_post prebunking_inoc prebunking_no_inoc correction inoculation factcheck_w4, robust
lincom prebunking_inoc-prebunking_no_inoc
lincom correction-inoculation
est store conf22_noc

reg confidence_2022_w5_post prebunking_inoc##pass_attention_w5 prebunking_no_inoc##pass_attention_w5 correction inoculation factcheck_w4 `confidence_2022_w5_post_ctl', robust
est store attmod5

coefplot conf22,keep(prebunking_inoc prebunking_no_inoc) xline(0) scheme(lean1) xtitle("Confidence in 2022 election") coeflabel(prebunking_inoc  = "Forewarning" prebunking_no_inoc = "No forewarning")
graph export "conf22-w5.png", replace

quietly lasso linear confidence_2022_w5 college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre targeted_false_w5_pre discernment_pre, rseed(1234)
local confidence_2022_w5_ctl=e(allvars_sel) 

reg confidence_2022_w5 correction inoculation factcheck_w4 `confidence_2022_w5_ctl', robust
lincom correction-inoculation
est store conf22pre
est store conf22w5orig

reg confidence_2022_w5 correction inoculation factcheck_w4 confidence_2022_w3, robust
est store conf22w5orig_ldv

reg confidence_2022_w5 correction inoculation factcheck_w4, robust
est store conf22w5orig_noc

*TEST PRECISION EFFECT OF ADDING W4 CONTROLS, no correction inoculation

preserve 

drop _merge
rename caseid caseid_Dart0053_W1
rename caseid_orig caseid_first

rename caseid_Dart0053_W2 caseid_orig
drop if caseid_orig==.
merge 1:1 caseid_orig using "2022w2.dta"
tab _merge
drop if _merge==2
drop _merge

quietly lasso linear confidence_2022_w5_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre targeted_false_w5_pre discernment_pre, rseed(1234)
local confidence_2022_w5_post_ctl=e(allvars_sel) 

quietly lasso linear confidence_2022_w5_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 seats_won_fraud_2020_w4 seats_won_fraud_2022_w4 fraud2020w3_pre confidence_2020_w4 confidence_2022_w4 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm, rseed(1234)
local confidence_2022_w5_post_ctl2=e(allvars_sel) 

reg confidence_2022_w5_post prebunking_inoc prebunking_no_inoc `confidence_2022_w5_post_ctl', robust
reg confidence_2022_w5_post prebunking_inoc prebunking_no_inoc `confidence_2022_w5_post_ctl2', robust

****w4 persistence graph here

*2022 seats won = B0 + B1*w3_prebunk_inst + B2*w3_prebunk_no_inst + B3*w2_correction + B4*w1_correction + B5*w1_inoculation + quietly lasso controls
*lincom B1-B2

quietly lasso linear seats_won_fraud_2022_w4_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre targeted_false_w5_pre discernment_pre, rseed(1234)
local seats_won_fraud_22_w4_post_ctl=e(allvars_sel) 

reg seats_won_fraud_2022_w4_post correction inoculation factcheck_w4 `seats_won_fraud_22_w4_post_ctl', robust
lincom correction-inoculation
est store seats22w4

*2022 confidence = B0 + B1*w3_prebunk_inst + B2*w3_prebunk_no_inst + B3*w2_correction + B4*w1_correction + B5*w1_inoculation + quietly lasso controls
*lincom B1-B2

quietly lasso linear confidence_2022_w4_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre targeted_false_w5_pre discernment_pre, rseed(1234)
local confidence_2022_w4_post_ctl=e(allvars_sel) 

reg confidence_2022_w4_post correction inoculation factcheck_w4 `confidence_2022_w4_post_ctl', robust
lincom correction-inoculation
est store conf22w4

restore 

preserve 

drop _merge
merge 1:1 caseid using "2022w1.dta"
tab _merge
drop if _merge==2
drop _merge

****w3 persistence graph here

*2022 seats won = B0 + B1*w3_prebunk_inst + B2*w3_prebunk_no_inst + B3*w2_correction + B4*w1_correction + B5*w1_inoculation + quietly lasso controls
*lincom B1-B2

quietly lasso linear seats_won_fraud_2022_w3_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre targeted_false_w5_pre discernment_pre, rseed(1234)
local seats_won_fraud_22_w3_post_ctl=e(allvars_sel) 

reg seats_won_fraud_2022_w3_post correction inoculation `seats_won_fraud_22_w3_post_ctl', robust
lincom correction-inoculation
est store seats22w3

*2022 confidence = B0 + B1*w3_prebunk_inst + B2*w3_prebunk_no_inst + B3*w2_correction + B4*w1_correction + B5*w1_inoculation + quietly lasso controls
*lincom B1-B2

quietly lasso linear confidence_2022_w3_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre targeted_false_w5_pre discernment_pre, rseed(1234)
local confidence_2022_w3_post_ctl=e(allvars_sel) 

reg confidence_2022_w3_post correction inoculation `confidence_2022_w3_post_ctl', robust
lincom correction-inoculation
est store conf22w3

restore

*RESUME AFTER PRESERVE/RESTORE 

*2022 fraud prevalence = B0 + B1*w3_prebunk_inst + B2*w3_prebunk_no_inst + B3*w2_correction + B4*w1_correction + B5*w1_inoculation + quietly lasso controls
*lincom B1-B2

quietly lasso linear fraud2022w5_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre targeted_false_w5_pre discernment_pre, rseed(1234)
local fraud2022w5_post_ctl=e(allvars_sel) 

reg fraud2022w5_post prebunking_inoc prebunking_no_inoc correction inoculation factcheck_w4 `fraud2022w5_post_ctl', robust
lincom prebunking_inoc-prebunking_no_inoc
lincom correction-inoculation
est store fraud22

reg fraud2022w5_post prebunking_inoc prebunking_no_inoc correction inoculation factcheck_w4 fraud2020w3_pre, robust
lincom prebunking_inoc-prebunking_no_inoc
lincom correction-inoculation
est store fraud22_ldv

reg fraud2022w5_post prebunking_inoc prebunking_no_inoc correction inoculation factcheck_w4, robust
lincom prebunking_inoc-prebunking_no_inoc
lincom correction-inoculation
est store fraud22_noc

quietly lasso linear fraud2022w5_pre college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre targeted_false_w5_pre discernment_pre, rseed(1234)
local fraud2022w5_pre_ctl=e(allvars_sel) 

reg fraud2022w5_pre correction inoculation factcheck_w4 `fraud2022w5_pre_ctl', robust
lincom correction-inoculation
est store fraud22pre

coefplot fraud22,keep(prebunking_inoc prebunking_no_inoc) xline(0) scheme(lean1) xtitle("Fraud prevalence in 2022 election") coeflabel(prebunking_inoc  = "Forewarning" prebunking_no_inoc = "No forewarning")
graph export "fraud22-w5.png", replace

*2022 seats won = B0 + B1*w3_prebunk_inst + B2*w3_prebunk_no_inst + B3*w2_correction + B4*w1_correction + B5*w1_inoculation + quietly lasso controls
*lincom B1-B2

quietly lasso linear seats_won_fraud_2022_w5_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre targeted_false_w5_pre discernment_pre, rseed(1234)
local seats_won_fraud_22_w5_post_ctl=e(allvars_sel) 

reg seats_won_fraud_2022_w5_post prebunking_inoc prebunking_no_inoc correction inoculation factcheck_w4 `seats_won_fraud_22_w5_post_ctl', robust
lincom prebunking_inoc-prebunking_no_inoc
lincom correction-inoculation
est store seats22

reg seats_won_fraud_2022_w5_post prebunking_inoc prebunking_no_inoc correction inoculation factcheck_w4 seats_won_fraud_2022_w3, robust
lincom prebunking_inoc-prebunking_no_inoc
lincom correction-inoculation
est store seats22_ldv

reg seats_won_fraud_2022_w5_post prebunking_inoc prebunking_no_inoc correction inoculation factcheck_w4, robust
lincom prebunking_inoc-prebunking_no_inoc
lincom correction-inoculation
est store seats22_noc

coefplot seats22,keep(prebunking_inoc prebunking_no_inoc) xline(0) scheme(lean1) xtitle("Seats won due to fraud in 2022 election") coeflabel(prebunking_inoc  = "Forewarning" prebunking_no_inoc = "No forewarning")
graph export "seats22-w5.png", replace

quietly lasso linear seats_won_fraud_2022_w5 college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre targeted_false_w5_pre discernment_pre, rseed(1234)
local seats_won_fraud_22_w5_pre_ctl=e(allvars_sel) 

reg seats_won_fraud_2022_w5 correction inoculation factcheck_w4 `seats_won_fraud_22_w5_pre_ctl', robust
lincom correction-inoculation
est store seats22pre
est store seats22w5orig

reg seats_won_fraud_2022_w5 correction inoculation factcheck_w4 seats_won_fraud_2022_w3, robust
est store seats22w5orig_ldv

reg seats_won_fraud_2022_w5 correction inoculation factcheck_w4, robust
est store seats22w5orig_noc

*2024 confidence = B0 + B1*w3_prebunk_inst + B2*w3_prebunk_no_inst + B3*w2_correction + B4*w1_correction + B5*w1_inoculation + quietly lasso controls
*lincom B1-B2

quietly lasso linear confidence_2024_w5_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre targeted_false_w5_pre discernment_pre, rseed(1234)
local confidence_2024_w5_post_ctl=e(allvars_sel) 

reg confidence_2024_w5_post prebunking_inoc prebunking_no_inoc correction inoculation factcheck_w4 `confidence_2024_w5_post_ctl', robust
lincom prebunking_inoc-prebunking_no_inoc
lincom correction-inoculation
est store conf24

reg confidence_2024_w5_post prebunking_inoc prebunking_no_inoc correction inoculation factcheck_w4 confidence_2022_w3, robust
lincom prebunking_inoc-prebunking_no_inoc
lincom correction-inoculation
est store conf24_ldv

reg confidence_2024_w5_post prebunking_inoc prebunking_no_inoc correction inoculation factcheck_w4, robust
lincom prebunking_inoc-prebunking_no_inoc
lincom correction-inoculation
est store conf24_noc

quietly lasso linear confidence_2024_w5 college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre targeted_false_w5_pre discernment_pre, rseed(1234)
local confidence_2024_w5_ctl=e(allvars_sel) 

reg confidence_2024_w5 correction inoculation factcheck_w4 `confidence_2024_w5_ctl', robust
lincom correction-inoculation
est store conf24pre

coefplot conf24,keep(prebunking_inoc prebunking_no_inoc) xline(0) scheme(lean1) xtitle("Confidence in 2024 election") coeflabel(prebunking_inoc  = "Forewarning" prebunking_no_inoc = "No forewarning")
graph export "conf24-w5.png", replace

*2024 fraud prevalence = B0 + B1*w3_prebunk_inst + B2*w3_prebunk_no_inst + B3*w2_correction + B4*w1_correction + B5*w1_inoculation + quietly lasso controls
*lincom B1-B2

quietly lasso linear fraud2024w5_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre targeted_false_w5_pre discernment_pre, rseed(1234)
local fraud2024w5_post_ctl=e(allvars_sel) 

reg fraud2024w5_post prebunking_inoc prebunking_no_inoc correction inoculation factcheck_w4 `fraud2024w5_post_ctl', robust
lincom prebunking_inoc-prebunking_no_inoc
lincom correction-inoculation
est store fraud24

reg fraud2024w5_post prebunking_inoc prebunking_no_inoc correction inoculation factcheck_w4 fraud2020w3_pre, robust
lincom prebunking_inoc-prebunking_no_inoc
lincom correction-inoculation
est store fraud24_ldv

reg fraud2024w5_post prebunking_inoc prebunking_no_inoc correction inoculation factcheck_w4, robust
lincom prebunking_inoc-prebunking_no_inoc
lincom correction-inoculation
est store fraud24_noc

reg confidence_2024_w5_post prebunking_inoc##pass_attention_w5 prebunking_no_inoc##pass_attention_w5 correction inoculation factcheck_w4 `confidence_2024_w5_post_ctl', robust
est store attmod6

estout attmod5 attmod6 using "study3-attention-interactions.tex", label style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** .005) 

coefplot fraud24,keep(prebunking_inoc prebunking_no_inoc) xline(0) scheme(lean1) xtitle("Fraud prevalence in 2024 election") coeflabel(prebunking_inoc  = "Forewarning" prebunking_no_inoc = "No forewarning")
graph export "fraud24-w5.png", replace

quietly lasso linear fraud2024w5_pre college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre targeted_false_w5_pre discernment_pre, rseed(1234)
local fraud2024w5_pre_ctl=e(allvars_sel) 

reg fraud2024w5_pre correction inoculation factcheck_w4 `fraud2024w5_pre_ctl', robust
lincom correction-inoculation
est store fraud24pre

*2024 seats won = B0 + B1*w3_prebunk_inst + B2*w3_prebunk_no_inst + B3*w2_correction + B4*w1_correction + B5*w1_inoculation + quietly lasso controls
*lincom B1-B2

quietly lasso linear seats_won_fraud_2024_w5_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre targeted_false_w5_pre discernment_pre, rseed(1234)
local seats_won_fraud_24_w5_post_ctl=e(allvars_sel) 

reg seats_won_fraud_2024_w5_post prebunking_inoc prebunking_no_inoc correction inoculation factcheck_w4 `seats_won_fraud_24_w5_post_ctl', robust
lincom prebunking_inoc-prebunking_no_inoc
lincom correction-inoculation
est store seats24

reg seats_won_fraud_2024_w5_post prebunking_inoc prebunking_no_inoc correction inoculation factcheck_w4 seats_won_fraud_2022_w3, robust
lincom prebunking_inoc-prebunking_no_inoc
lincom correction-inoculation
est store seats24_ldv

reg seats_won_fraud_2024_w5_post prebunking_inoc prebunking_no_inoc correction inoculation factcheck_w4, robust
lincom prebunking_inoc-prebunking_no_inoc
lincom correction-inoculation
est store seats24_noc

coefplot seats24,keep(prebunking_inoc prebunking_no_inoc) xline(0) scheme(lean1) xtitle("Seats won due to fraud in 2024 election") coeflabel(prebunking_inoc  = "Forewarning" prebunking_no_inoc = "No forewarning")
graph export "seats24-w5.png", replace

coefplot (conf22, drop(prebunking_no_inoc) rename(prebunking_inoc="conf22") offset(.1) msize(large) msymbol(Th)) (conf24, drop(prebunking_no_inoc) rename(prebunking_inoc="conf24") offset(.1) msize(large) msymbol(Th)) (fraud22, drop(prebunking_no_inoc) rename(prebunking_inoc="fraud22") offset(.1) msize(large) msymbol(Th)) (fraud24, drop(prebunking_no_inoc) rename(prebunking_inoc="fraud24") offset(.1) msize(large) msymbol(Th)) (seats22, drop(prebunking_no_inoc) rename(prebunking_inoc="seats22") offset(.1) msize(large) msymbol(Th)) (seats24, drop(prebunking_no_inoc) rename(prebunking_inoc="seats24") offset(.1) msize(large) msymbol(Th)) (conf22, drop(prebunking_inoc) rename(prebunking_no_inoc="conf22") offset(-.1) msize(large) msymbol(S)) (conf24, drop(prebunking_inoc) rename(prebunking_no_inoc="conf24") offset(-.1) msize(large) msymbol(S)) (fraud22, drop(prebunking_inoc) rename(prebunking_no_inoc="fraud22") offset(-.1) msize(large) msymbol(S)) (fraud24, drop(prebunking_inoc) rename(prebunking_no_inoc="fraud24") offset(-.1) msize(large) msymbol(S)) (seats22, drop(prebunking_inoc) rename(prebunking_no_inoc="seats22") offset(-.1) msize(large) msymbol(S)) (seats24, drop(prebunking_inoc) rename(prebunking_no_inoc="seats24") offset(-.1) msize(large) msymbol(S)), keep(prebunking_inoc prebunking_no_inoc) grid(none) xline(0) scheme(lean1) xtitle("Treatment effect") coeflabel(conf24  = `" "Confidence in" "2024 election" "' seats24 = `" "Seats won by" "fraud in 2024" "' conf22 = `" "Confidence in" "2022 election" "' fraud22 = `" "Fraud in" "2022 election" "' fraud24 = `" "Fraud in" "2024 election" "' seats22 = `" "Seats won by" "fraud in 2022" "') legend(lab(2 "Forewarning") lab(14 "No forewarning") order(2 14) rows(1) pos(6) size(vsmall) bmargin(small) region(lcolor(black) margin(small))) offset(0) xscale(r(-.2 .15)) xlabel(-.2 -.1 -.2 0 .1) title("Voter confidence and fraud perceptions",size(*.8)) saving(s3g1, replace)
graph export "wave3-separate.pdf", replace
graph export "wave3-separate.png", replace

estout conf22 conf24 fraud22 fraud24 seats22 seats24 using "wave3-separate.tex", keep(prebunking_inoc prebunking_no_inoc) label style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** 0.005) 

estout conf22 conf22_ldv conf22_noc conf24 conf24_ldv conf24_noc using "wave3-separate1.tex", keep(prebunking_inoc prebunking_no_inoc) label style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** 0.005) 

estout fraud22 fraud22_ldv fraud22_noc fraud24 fraud24_ldv fraud24_noc seats22 seats22_ldv seats22_noc seats24 seats24_ldv seats24_noc using "wave3-separate2.tex", keep(prebunking_inoc prebunking_no_inoc) label style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** 0.005) 

quietly lasso linear seats_won_fraud_2024_w5 college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre targeted_false_w5_pre discernment_pre, rseed(1234)
local seats_won_fraud_24_w5_pre_ctl=e(allvars_sel) 

reg seats_won_fraud_2024_w5 correction inoculation factcheck_w4 `seats_won_fraud_24_w5_pre_ctl', robust
lincom correction-inoculation
est store seats24pre

coefplot (conf22pre, rename(correction="conf22pre"))  (conf24pre, rename(correction="conf24pre")) (fraud22pre, rename(correction="fraud22pre")) (fraud24pre,rename(correction="fraud24pre")) (seats22pre, rename(correction="seats22pre")) (seats24pre, rename(correction="seats24pre")), keep(correction) grid(none) xline(0) scheme(lean1) xtitle("Treatment effect") coeflabel(conf22pre = "Confidence in 2022 election" fraud22pre = "Fraud prevalence in 2022" seats22pre = "Seats won by fraud in 2022" conf24pre = "Confidence in 2024 election" fraud24pre = "Fraud prevalence in 2024" seats24pre = "Seats won by fraud in 2024") legend(off) offset(0) xscale(r(-.25 .1)) xlabel(-.2 -.1 0 .1)
graph export "wave3-w1correction.pdf", replace
graph export "wave3-w1correction.png", replace

coefplot (conf22pre, rename(inoculation="conf22pre"))  (conf24pre, rename(inoculation="conf24pre")) (fraud22pre, rename(inoculation="fraud22pre")) (fraud24pre,rename(inoculation="fraud24pre")) (seats22pre, rename(inoculation="seats22pre")) (seats24pre, rename(inoculation="seats24pre")), keep(inoculation) grid(none) xline(0) scheme(lean1) xtitle("Treatment effect") coeflabel(conf22pre = "Confidence in 2022 election" fraud22pre = "Fraud prevalence in 2022" seats22pre = "Seats won by fraud in 2022" conf24pre = "Confidence in 2024 election" fraud24pre = "Fraud prevalence in 2024" seats24pre = "Seats won by fraud in 2024") legend(off) offset(0) xscale(r(-.25 .1)) xlabel(-.2 -.1 0 .1)
graph export "wave3-w1inoculation.pdf", replace
graph export "wave3-w1inoculation.png", replace

*persistence graphs - only wave 3 respondents
coefplot (conf22w3, rename(correction="Confidence in 2022 election") offset(.1) msymbol(Oh)) (conf22w4, rename(correction="Confidence in 2022 election") offset(0) msymbol(D)) (conf22, rename(correction="Confidence in 2022 election") offset(-.1) msymbol(Sh)) (seats22w3, rename(correction="Seats won by fraud in 2022") offset(.1) msymbol(Oh)) (seats22w4, rename(correction="Seats won by fraud in 2022") offset(0) msymbol(D)) (seats22, rename(correction="Seats won by fraud in 2022") offset(-.1) msymbol(Sh)), keep(correction) grid(none) xline(0) scheme(lean1) xtitle("Treatment effect") coeflabel(conf22w3 = "Wave 1" conf22w4 = "Wave 2" conf22w5 = "Wave 3" seats22w3 = "Wave 1" seats22w4 = "Wave 2" seats22w5 = "Wave 3") legend(lab(2 "Wave 1") lab(4 "Wave 2") lab(6 "Wave 3") order(2 4 6)) xscale(r(-.2 .1)) xlabel(-.2 -.1 0 .1)
graph export "wave123-w1correction.pdf", replace
graph export "wave123-w1correction.png", replace

coefplot (conf22w3, rename(inoculation="Confidence in 2022 election") offset(.1) msymbol(Oh)) (conf22w4, rename(inoculation="Confidence in 2022 election") offset(0) msymbol(D)) (conf22, rename(inoculation="Confidence in 2022 election") offset(-.1) msymbol(Sh)) (seats22w3, rename(inoculation="Seats won by fraud in 2022") offset(.1) msymbol(Oh)) (seats22w4, rename(inoculation="Seats won by fraud in 2022") offset(0) msymbol(D)) (seats22, rename(inoculation="Seats won by fraud in 2022") offset(-.1) msymbol(Sh)), keep(inoculation) grid(none) xline(0) scheme(lean1) xtitle("Treatment effect") coeflabel(conf22w3 = "Wave 1" conf22w4 = "Wave 2" conf22w5 = "Wave 3" seats22w3 = "Wave 1" seats22w4 = "Wave 2" seats22w5 = "Wave 3") legend(lab(2 "Wave 1") lab(4 "Wave 2") lab(6 "Wave 3") order(2 4 6)) xscale(r(-.2 .1)) xlabel(-.2 -.1 0 .1)
graph export "wave123-w1inoculation.pdf", replace
graph export "wave123-w1inoculation.png", replace

estout bidenw3orig bidenw4orig conf20orig conf20w4orig conf22w3orig conf22w4orig conf22w5orig fraud20orig fraud20w4orig seats20orig seats20w4orig seats22w3orig seats22w4orig seats22w5orig using "w1effects-persistence.tex", label keep(correction inoculation) style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** 0.005) 

estout bidenw4orig bidenw4orig_ldv bidenw4orig_noc conf20w4orig conf20w4orig_ldv conf20w4orig_noc conf22w4orig conf22w4orig_ldv conf22w4orig_noc conf22w5orig conf22w5orig_ldv conf22w5orig_noc using "w1effects-persistence1.tex", label keep(correction inoculation) style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** 0.005) 

estout fraud20w4orig fraud20w4orig_ldv fraud20w4orig_noc seats20w4orig seats20w4orig_ldv seats20w4orig_noc seats22w4orig seats22w4orig_ldv seats22w4orig_noc seats22w5orig seats22w5orig_ldv seats22w5orig_noc using "w1effects-persistence2.tex", label keep(correction inoculation) style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** 0.005) 

*persistence graphs - results from wave in question, pre
coefplot (bidenw3orig, rename(correction=`" "Biden rightful winner in 2020" "') offset(.2) msize(large) msymbol(Oh)) (bidenw4orig, rename(correction=`" "Biden rightful winner in 2020" "') offset(0) msize(large) msymbol(D)) (conf20orig, rename(correction=`" "Confidence in 2020 election" "') offset(.2) msize(large) msymbol(Oh)) (conf20w4orig, rename(correction=`" "Confidence in 2020 election" "') offset(0) msize(large) msymbol(D)) (conf22w3orig, rename(correction=`" "Confidence in" "2022 election" "') offset(.2) msize(large) msymbol(Oh)) (conf22w4orig, rename(correction=`" "Confidence in" "2022 election" "') offset(0) msize(large) msymbol(D)) (conf22w5orig, rename(correction=`" "Confidence in" "2022 election" "') offset(-.2) msize(large) msymbol(Sh)) (fraud20orig, rename(correction=`" "Fraud in     " "2020 election" "') offset(.2) msize(large) msymbol(Oh)) (fraud20w4orig, rename(correction=`" "Fraud in     " "2020 election" "') offset(0) msize(large) msymbol(D)) (seats20orig, rename(correction=`" "Seats won by" "fraud in 2020" "') offset(.2) msize(large) msymbol(Oh)) (seats20w4orig, rename(correction=`" "Seats won by" "fraud in 2020" "') offset(0) msize(large) msymbol(D)) (seats22w3orig, rename(correction=`" "Seats won by" "fraud in 2022" "') offset(.2) msize(large) msymbol(Oh)) (seats22w4orig, rename(correction=`" "Seats won by" "fraud in 2022" "') offset(0) msize(large) msymbol(D)) (seats22w5orig, rename(correction=`" "Seats won by" "fraud in 2022" "') offset(-.2) msize(large) msymbol(Sh)), keep(correction) grid(none) xline(0) scheme(lean1) xtitle("Treatment effect") coeflabel(conf20orig = "Wave 1" conf20w4 = "Wave 2" conf22w3orig = "Wave 1" conf22w4 = "Wave 2" conf22w5 = "Wave 3" fraud20orig = "Wave 1" fraud20w4orig = "Wave 2" seats20w3 = "Wave 1" seats20w4 = "Wave 2" seats22w3 = "Wave 1" seats22w4 = "Wave 2" seats22w5 = "Wave 3", wrap(14)) legend(lab(2 "Wave 1") lab(4 "Wave 2") lab(14 "Wave 3") order(2 4 14) rows(1) pos(6) size(vsmall) bmargin(small) region(lcolor(black) margin(small))) xscale(r(-.2 .12)) xlabel(-.2 -.1 -.2 0 .1) saving(g1, replace) title("Credible sources",size(*.8))
graph export "wave123v2-w1correction.pdf", replace
graph export "wave123v2-w1correction.png", replace

coefplot (bidenw3orig, rename(inoculation=`" "Biden rightful winner in 2020" "') offset(.2) msize(large) msymbol(Oh)) (bidenw4orig, rename(inoculation=`" "Biden rightful winner in 2020" "') offset(0) msize(large) msymbol(D)) (conf20orig, rename(inoculation=`" "Confidence in 2020 election" "') offset(.2) msize(large) msymbol(Oh)) (conf20w4orig, rename(inoculation=`" "Confidence in 2020 election" "') offset(0) msize(large) msymbol(D)) (conf22w3orig, rename(inoculation=`" "Confidence in" "2022 election" "') offset(.2) msize(large) msymbol(Oh)) (conf22w4orig, rename(inoculation=`" "Confidence in" "2022 election" "') offset(0) msize(large) msymbol(D)) (conf22w5orig, rename(inoculation=`" "Confidence in" "2022 election" "') offset(-.2) msize(large) msymbol(Sh)) (fraud20orig, rename(inoculation=`" "Fraud in     " "2020 election" "') offset(.2) msize(large) msymbol(Oh)) (fraud20w4orig, rename(inoculation=`" "Fraud in     " "2020 election" "') offset(0) msize(large) msymbol(D)) (seats20orig, rename(inoculation=`" "Seats won by" "fraud in 2020" "') offset(.2) msize(large) msymbol(Oh)) (seats20w4orig, rename(inoculation=`" "Seats won by" "fraud in 2020" "') offset(0) msize(large) msymbol(D)) (seats22w3orig, rename(inoculation=`" "Seats won by" "fraud in 2022" "') offset(.2) msize(large) msymbol(Oh)) (seats22w4orig, rename(inoculation=`" "Seats won by" "fraud in 2022" "') offset(0) msize(large) msymbol(D)) (seats22w5orig, rename(inoculation=`" "Seats won by" "fraud in 2022" "') offset(-.2) msize(large) msymbol(Sh)), keep(inoculation) grid(none) xline(0) scheme(lean1) xtitle("Treatment effect") coeflabel(conf20orig = "Wave 1" conf20w4 = "Wave 2" conf22w3 = "Wave 1" conf22w4 = "Wave 2" conf22w5 = "Wave 3" fraud20orig = "Wave 1" fraud20w4orig = "Wave 2" seats20w3 = "Wave 1" seats20w4 = "Wave 2" seats22w3orig = "Wave 1" seats22w4 = "Wave 2" seats22w5orig = "Wave 3", wrap(14)) legend(lab(2 "Wave 1") lab(4 "Wave 2") lab(14 "Wave 3") order(2 4 14) pos(5) ring(0) region(lstyle(foregrond))) xscale(r(-.2 .12)) xlabel(-.2 -.1 -.2 0 .1) saving(g2, replace) title("Prebunking",size(*.8))
graph export "wave123v2-w1inoculation.pdf", replace
graph export "wave123v2-w1inoculation.png", replace

grc1leg g1.gph g2.gph, rows(1) legendfrom(g1.gph) 
graph export "figure2.pdf", replace

est drop *orig

capture gen prebunk_combined=(prebunking_inoc==1 | prebunking_no_inoc==1)

reg confidence_2022_w5_post prebunk_combined correction inoculation factcheck_w4 `confidence_2022_w5_post_ctl', robust
est store conf22_combined

reg confidence_2022_w5_post prebunk_combined correction inoculation factcheck_w4 confidence_2022_w3, robust
est store conf22_combined_ldv

reg confidence_2022_w5_post prebunk_combined correction inoculation factcheck_w4, robust
est store conf22_combined_noc

reg fraud2022w5_post prebunk_combined inoculation correction factcheck_w4 `fraud2022w5_post_ctl', robust
est store fraud22_combined

reg fraud2022w5_post prebunk_combined inoculation correction factcheck_w4 fraud2020w3_pre, robust
est store fraud22_combined_ldv

reg fraud2022w5_post prebunk_combined inoculation correction factcheck_w4, robust
est store fraud22_combined_noc

reg seats_won_fraud_2022_w5_post prebunk_combined correction inoculation factcheck_w4 `seats_won_fraud_22_w5_post_ctl', robust
est store seats22_combined

reg seats_won_fraud_2022_w5_post prebunk_combined correction inoculation factcheck_w4 seats_won_fraud_2022_w3, robust
est store seats22_combined_ldv

reg seats_won_fraud_2022_w5_post prebunk_combined correction inoculation factcheck_w4, robust
est store seats22_combined_noc

reg confidence_2024_w5_post prebunk_combined correction inoculation factcheck_w4 `confidence_2024_w5_post_ctl', robust
est store conf24_combined

reg confidence_2024_w5_post prebunk_combined correction inoculation factcheck_w4 confidence_2022_w3, robust
est store conf24_combined_ldv

reg confidence_2024_w5_post prebunk_combined correction inoculation factcheck_w4, robust
est store conf24_combined_noc

reg fraud2024w5_post prebunk_combined inoculation correction factcheck_w4 `fraud2024w5_post_ctl', robust
est store fraud24_combined

reg fraud2024w5_post prebunk_combined inoculation correction factcheck_w4 fraud2020w3_pre, robust
est store fraud24_combined_ldv

reg fraud2024w5_post prebunk_combined inoculation correction factcheck_w4, robust
est store fraud24_combined_noc

reg seats_won_fraud_2024_w5_post prebunk_combined correction inoculation factcheck_w4 `seats_won_fraud_24_w5_post_ctl', robust
est store seats24_combined

reg seats_won_fraud_2024_w5_post prebunk_combined correction inoculation factcheck_w4 seats_won_fraud_2022_w3, robust
est store seats24_combined_ldv

reg seats_won_fraud_2024_w5_post prebunk_combined correction inoculation factcheck_w4, robust
est store seats24_combined_noc

estout conf22_combined fraud22_combined seats22_combined conf24_combined fraud24_combined seats24_combined using "lastwavecombined.tex", label keep(prebunk_combined) style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** 0.005) 

estout conf22_combined conf22_combined_ldv conf22_combined_noc conf24_combined conf24_combined_ldv conf24_combined_noc using "lastwavecombined1.tex", label keep(prebunk_combined) style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** 0.005) 

estout fraud22_combined fraud22_combined_ldv fraud22_combined_noc fraud24_combined fraud24_combined_ldv fraud24_combined_noc seats22_combined seats22_combined_ldv seats22_combined_noc seats24_combined seats24_combined_ldv seats24_combined_noc using "lastwavecombined2.tex", label keep(prebunk_combined) style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** 0.005) 

coefplot (conf22_combined, rename(prebunk_combined="conf22") msize(large) msymbol(O))  (conf24_combined, rename(prebunk_combined="conf24") msize(large)) (fraud22_combined, rename(prebunk_combined="fraud22") msize(large) msymbol(O)) (fraud24_combined,rename(prebunk_combined="fraud24") msize(large) msymbol(O)) (seats22_combined, rename(prebunk_combined="seats22") msize(large) msymbol(O)) (seats24_combined, rename(prebunk_combined="seats24") msize(large) msymbol(O)), keep(prebunk_combined) xline(0) scheme(lean1) xtitle("Treatment effect") coeflabel(conf22  = `" "Confidence in" "2022 election" "' fraud22 = `" "Fraud in" "2022 election" "' seats22 = `" "Seats won by" "fraud in 2022" "' conf24  = `" "Confidence in" "2024 election" "' fraud24 = `" "Fraud in" "2024 election" "' seats24 = `" "Seats won by" "fraud in 2024" "') legend(off) offset(0) grid(no) xlabel(-.2 -.1 0 .1)
graph export "wave3-combined.pdf", replace
graph export "wave3-combined.png", replace

est drop conf22_combined fraud22_combined seats22_combined conf24_combined fraud24_combined seats24_combined conf22_combined_ldv conf22_combined_noc conf24_combined_ldv conf24_combined_noc

est drop fraud22_combined_ldv fraud22_combined_noc fraud24_combined_ldv fraud24_combined_noc seats22_combined_ldv seats22_combined_noc seats24_combined_ldv seats24_combined_noc

*H5: Exposure to a prebunking correction will reduce the perceived accuracy of the misperceptions it targets (H5a), increase the perceived accuracy of the true claims it supports (H5b), and improve respondents' ability to distinguish between them (H5c) compared to the placebo condition regardless of whether the prebunking correction is preceded by instructions alerting participants that they might be exposed to misinformation in the future.
 
*RQ7: Will exposure to a prebunking correction preceded by instructions alerting participants that they might be exposed to misinformation in the future affect the perceived accuracy of the misperceptions it targets (RQ7a), the perceived accuracy of the true claims it supports (RQ7b), or respondents' ability to distinguish between them (RQ7c) compared to exposure to the same correction material without the preceding instructions?

*Targeted true = B0 + B1*w3_prebunk_inst + B2*w3_prebunk_no_inst + B3*w2_correction + B4*w1_correction + B5*w1_inoculation + quietly lasso controls
*lincom B1-B2

quietly lasso linear targeted_true_w5_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre targeted_false_w5_pre discernment_pre, rseed(1234)
local targeted_true_w5_post_ctl=e(allvars_sel) 

reg targeted_true_w5_post prebunking_inoc prebunking_no_inoc correction inoculation factcheck_w4 `targeted_true_w5_post_ctl', robust
est store true
lincom prebunking_inoc-prebunking_no_inoc

reg targeted_true_w5_post prebunking_inoc prebunking_no_inoc correction inoculation factcheck_w4 targeted_true_w5_pre, robust
est store true_ldv
lincom prebunking_inoc-prebunking_no_inoc

reg targeted_true_w5_post prebunking_inoc prebunking_no_inoc correction inoculation factcheck_w4, robust 
est store true_noc
lincom prebunking_inoc-prebunking_no_inoc

reg targeted_true_w5_post prebunk_combined correction inoculation factcheck_w4 `targeted_true_w5_post_ctl', robust
est store true_combined

reg targeted_true_w5_post prebunk_combined correction inoculation factcheck_w4 targeted_true_w5_pre, robust
est store true_combined_ldv

reg targeted_true_w5_post prebunk_combined correction inoculation factcheck_w4, robust
est store true_combined_noc

*Targeted false = B0 + B1*w3_prebunk_inst + B2*w3_prebunk_no_inst + B3*w2_correction + B4*w1_correction + B5*w1_inoculation + quietly lasso controls
*lincom B1-B2

quietly lasso linear targeted_false_w5_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre targeted_false_w5_pre discernment_pre, rseed(1234)
local targeted_false_w5_post_ctl=e(allvars_sel) 

reg targeted_false_w5_post prebunking_inoc prebunking_no_inoc correction inoculation factcheck_w4 `targeted_false_w5_post_ctl', robust
lincom prebunking_inoc-prebunking_no_inoc
est store false

reg targeted_false_w5_post prebunking_inoc prebunking_no_inoc correction inoculation factcheck_w4 targeted_false_w5_pre, robust
lincom prebunking_inoc-prebunking_no_inoc
est store false_ldv

reg targeted_false_w5_post prebunking_inoc prebunking_no_inoc correction inoculation factcheck_w4, robust
lincom prebunking_inoc-prebunking_no_inoc
est store false_noc

reg targeted_false_w5_post prebunk_combined correction inoculation factcheck_w4 `targeted_false_w5_post_ctl', robust
est store false_combined

reg targeted_false_w5_post prebunk_combined correction inoculation factcheck_w4 targeted_false_w5_pre, robust
est store false_combined_ldv

reg targeted_false_w5_post prebunk_combined correction inoculation factcheck_w4, robust
est store false_combined_noc

*Mean true - mean false = B0 + B1*w3_prebunk_inst + B2*w3_prebunk_no_inst + B3*w2_correction + B4*w1_correction + B5*w1_inoculation + quietly lasso controls
*lincom B1-B2

gen discernment=targeted_true_w5_post-targeted_false_w5_post

quietly lasso linear discernment college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre targeted_false_w5_pre discernment_pre, rseed(1234)
local discernment_ctl=e(allvars_sel) 

reg discernment prebunking_inoc prebunking_no_inoc correction inoculation factcheck_w4 `discernment_ctl', robust
est store discern
lincom prebunking_inoc-prebunking_no_inoc

reg discernment prebunking_inoc prebunking_no_inoc correction inoculation factcheck_w4 discernment_pre, robust
est store discern_ldv
lincom prebunking_inoc-prebunking_no_inoc

reg discernment prebunking_inoc prebunking_no_inoc correction inoculation factcheck_w4, robust
est store discern_noc
lincom prebunking_inoc-prebunking_no_inoc

reg discernment prebunk_combined correction inoculation factcheck_w4 `discernment_ctl', robust
est store discernment_combined

reg discernment prebunk_combined correction inoculation factcheck_w4 discernment_pre, robust
est store discernment_combined_ldv

reg discernment prebunk_combined correction inoculation factcheck_w4, robust
est store discernment_combined_noc

estout true false discern using "lastwave-beliefs.tex", label keep(prebunking_inoc prebunking_no_inoc) style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** 0.005) 

estout true true_ldv true_noc false false_ldv false_noc discern discern_ldv discern_noc using "lastwave-beliefs.tex", label keep(prebunking_inoc prebunking_no_inoc) style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** 0.005) 

estout true_combined true_combined_ldv true_combined_noc false_combined false_combined_ldv false_combined_noc discernment_combined discernment_combined_ldv discernment_combined_noc using "lastwave-combined-beliefs1.tex", label keep(prebunk_combined) style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** 0.005) 

coefplot true false discern, keep(prebunking_inoc prebunking_no_inoc) xline(0) scheme(lean1) xtitle("Treatment effect (perceived accuracy)") legend(lab(2 "True") lab(4 "False") lab(6 "Difference")) coeflabel(prebunking_inoc="Forewarning" prebunking_no_inoc="No forewarning")
graph export "discern.png", replace
graph export "discern.pdf", replace

coefplot (true, drop(prebunking_no_inoc) rename(prebunking_inoc="true") offset(.1) msize(large) msymbol(Th)) (false, drop(prebunking_no_inoc) rename(prebunking_inoc="false") offset(.1) msize(large) msymbol(Th)) (discern, drop(prebunking_no_inoc) rename(prebunking_inoc="discern") offset(.1) msize(large) msymbol(Th)) (true, drop(prebunking_inoc) rename(prebunking_no_inoc="true") offset(-.1) msize(large) msymbol(S)) (false, drop(prebunking_inoc) rename(prebunking_no_inoc="false") offset(-.1) msize(large) msymbol(S)) (discern, drop(prebunking_inoc) rename(prebunking_no_inoc="discern") offset(-.1) msize(large) msymbol(S)) , keep(prebunking_inoc prebunking_no_inoc) grid(none) xline(0) scheme(lean1) xtitle("Treatment effect") coeflabel(true  = "True statements" false = "False statements" discern = "Difference (T-F)") legend(lab(2 "Forewarning") lab(10 "No forewarning") order(2 10) pos(3) ring(0) region(lstyle(foregrond))) offset(0) xscale(r(-.2 .8)) xlabel(-.4 -.2 0 .2 .4 .6 .8) saving(s3g2, replace) title("Factual beliefs", size(*.8))
graph export "discern-separate.pdf", replace
graph export "discern-separate.png", replace

grc1leg s3g1.gph s3g2.gph, rows(1) legendfrom(s3g1.gph) 
graph export "figure4.pdf", replace

*(If the difference in treatment effects between the two Wave 3 treatments is null, we may also report models in which we pool the two treatments - e.g., estimate versions of the models above with one variable that takes the value of 1 if w3_prebunk_inst=1 or w3_prebunk_no_inst=1 and 0 otherwise.)
coefplot (true_combined, rename(prebunk_combined="true") msize(large) msymbol(O))  (false_combined, rename(prebunk_combined="false") msize(large) msymbol(O)) (discernment_combined, rename(prebunk_combined="discern") msize(large) msymbol(O)), keep(prebunk_combined) xline(0) scheme(lean1) xtitle("Treatment effect (perceived accuracy)") coeflabel(true  = "True statements" false = "False statements" discern = "Difference (T-F)") legend(off) offset(0) grid(no) xlabel(-.4 -.2 0 .2 .4 .6 .8)
graph export "discern-combined.pdf", replace
graph export "discern-combined.png", replace

est drop true false discern true_ldv true_noc false_ldv false_noc discern_ldv discern_noc true_combined true_combined_ldv true_combined_noc false_combined false_combined_ldv false_combined_noc discernment_combined discernment_combined_ldv discernment_combined_noc

*Per Guay et al. N.d., we will also estimate a version of the third model in which the outcome is the ratio of true/false belief accuracy rather than the difference. This model will be estimated using a quasi-poisson or other log link model instead of OLS.

gen ratio_discernment = targeted_true_w5_post/targeted_false_w5_post

reg ratio_discernment prebunking_inoc prebunking_no_inoc `discernment_ctl', robust 
lincom prebunking_inoc-prebunking_no_inoc

glm ratio_discernment prebunking_inoc prebunking_no_inoc `discernment_ctl', robust link(log)
lincom prebunking_inoc-prebunking_no_inoc

*These analyses will be estimated using means at the respondent level per above but we will verify that the conclusions are robust to a specification at the item level in which we cluster by respondent and item. 

preserve

rename targeted_false1_w5_post target1
rename targeted_false2_w5_post target2
rename targeted_true1_w5_post target3
rename targeted_true2_w5_post target4

reshape long target, i(caseid_orig) j(claim)
gen false=(claim<3)

quietly lasso linear target college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre targeted_false_w5_pre discernment_pre, rseed(1234)
local target_ctl=e(allvars_sel) 

reg target prebunking_inoc prebunking_no_inoc `target_ctl', robust
lincom prebunking_inoc-prebunking_no_inoc

reg target prebunk_combined correction inoculation factcheck_w4 `target_ctl', robust

restore

*RQ8: Do the treatment effects from the Arizona correction administered in Wave 2 persist in Wave 3? (i.e., are any effects measurable in Wave 3 for H3, RQ5a, or RQ5b?)

*We will repeat the analyses specified above for H3, RQ5a, and RQ5b among participants in Wave 3.

quietly lasso linear AZmaricopa_w5 college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre targeted_false_w5_pre discernment_pre, rseed(1234)
local AZmaricopa_w5_ctl=e(allvars_sel) 

reg AZmaricopa_w5 factcheck_w4 correction inoc `AZmaricopa_w5_ctl', robust
est store maricopa2

reg AZmaricopa_w5 factcheck_w4 correction inoc, robust
est store maricopa2_noc

bysort factcheck_w4: su AZmaricopa_w5

quietly lasso linear AZgov_rightful_w5 college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre targeted_false_w5_pre discernment_pre, rseed(1234)
local AZgov_rightful_w5_ctl=e(allvars_sel) 

reg AZgov_rightful_w5 factcheck_w4 correction inoc `AZgov_rightful_w5_ctl', robust
est store AZright2

reg AZgov_rightful_w5 factcheck_w4 correction inoc, robust
est store AZright2_noc

bysort factcheck_w4: su AZgov_rightful_w5

cibar AZmaricopa_w5, over1(factcheck_w4) graphopts(scheme(lean1) legend(on) ytitle("") yscale(r(1 4)) ylabel(1 "Not at all accurate" 2 "Not very accurate" 3 "Somewhat accurate" 4 "Very accurate") xtitle("Belief in AZ ballot printing error conspiracy (January)"))
graph export "azmaricopa-w5.pdf", replace

cibar AZgov_rightful_w5, over1(factcheck) graphopts(scheme(lean1) legend(on) ytitle("") yscale(r(1 4)) ylabel(1 "Strongly disagree" 2 "Somewhat disagree" 3 "Somewhat agree" 4 "Strongly agree") xtitle("Belief that Hobbs NOT rightful winner in AZ GOV (January)"))
graph export "azightful-w5.pdf", replace

quietly lasso linear confidence_2022_w5 college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre targeted_false_w5_pre discernment_pre, rseed(1234)
local confidence_2022_w5_ctl=e(allvars_sel) 

reg confidence_2022_w5 factcheck_w4 correction inoculation `confidence_2022_w5_ctl', robust
est store conf222

reg confidence_2022_w5 factcheck_w4 correction inoculation, robust
est store conf222_noc

quietly lasso linear seats_won_fraud_2022_w5 college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre targeted_false_w5_pre discernment_pre, rseed(1234)
local seats_won_fraud_2022_w5_ctl=e(allvars_sel) 

reg seats_won_fraud_2022_w5 factcheck_w4 correction inoculation `seats_won_fraud_2022_w5_ctl', robust
est store seats222

reg seats_won_fraud_2022_w5 factcheck_w4 correction inoculation, robust
est store seats222_noc

estout maricopa maricopa2 AZright AZright2 conf22forAZ conf222 seats22forAZ seats222 using "azcoefs-both.tex", label keep(factcheck_w4) style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** 0.005) 

estout maricopa_noc maricopa2_noc AZright_noc AZright2_noc conf22_noc conf222_noc seats22_noc seats222_noc using "azcoefs-both-noc.tex", label keep(factcheck_w4) style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** 0.005) 

coefplot (maricopa, offset(0.1) rename(factcheck_w4="maricopa") msymbol(circle) mcolor(black)) (maricopa2, offset(-0.1) rename(factcheck_w4="maricopa")   msymbol(Dh) mcolor(black)) (AZright, offset(0.1) rename(factcheck_w4="AZright") msymbol(circle) mcolor(black)) (AZright2, offset(-0.1) rename(factcheck_w4="AZright") msymbol(Dh) mcolor(black)) (conf22forAZ, offset(0.1) rename(factcheck_w4="conf22") msymbol(circle) mcolor(black)) (conf222, offset(-0.1) rename(factcheck_w4="conf22") msymbol(Dh) mcolor(black)) (seats22forAZ, offset(0.1) rename(factcheck_w4="seats22") msymbol(circle) mcolor(black)) (seats22, offset(-0.1) rename(factcheck_w4="seats22") msymbol(Dh) mcolor(black)), keep(factcheck_w4) xline(0) scheme(lean1) xtitle("Treatment effect") coeflabel(maricopa  = "Maricopa fraud myth" AZright = "Hobbs wrongful winner myth" conf22 = "Confidence in 2022 election" seats22 = "Seats won by fraud in 2022") grid(none) offset(0) headings(maricopa = "{bf:Specific: 2022 AZ GOV election}" conf22 = "{bf:General: 2022 U.S. elections}") legend(lab(2 "Treatment wave") lab(4 "Post-treatment wave") order(2 4) pos(7) ring(0) region(lstyle(foregrond)))
graph export "azcoefs-both.pdf", replace
graph export "azcoefs-both.png", replace

est drop maricopa maricopa2 AZright AZright2 conf22forAZ conf222 seats22forAZ seats222 maricopa_noc maricopa2_noc AZright_noc AZright2_noc conf22_noc conf222_noc seats22_noc seats222_noc

*Finally, we may conduct exploratory analyses of potential heterogeneous treatment effects for the following moderators for the models used to test H4, H5, RQ6, RQ7, and RQ8: 
*-party identification
*-Trump feeling thermometer
*-pre-treatment measure of outcome (where available) - SEE BELOW
*-assignment to Wave 1 treatment (correction, pre-bunking, placebo) and/or Wave 2 treatment (Arizona correction or placebo)

*separate HTEs

reg confidence_2022_w5_post prebunking_inoc##prebunking_no_inoc##inoculation##correction factcheck_w4 `confidence_2022_w5_post_ctl', robust
est store conf22ic

reg confidence_2022_w5_post prebunking_inoc##prebunking_no_inoc##inoculation##correction factcheck_w4 confidence_2022_w3, robust
est store conf22ic_ldv

reg confidence_2022_w5_post prebunking_inoc##prebunking_no_inoc##inoculation##correction factcheck_w4, robust
est store conf22ic_noc

reg confidence_2022_w5_post prebunking_inoc##prebunking_no_inoc##factcheck_w4 correction inoculation `confidence_2022_w5_post_ctl', robust
est store conf22fc

reg confidence_2022_w5_post prebunking_inoc##prebunking_no_inoc##factcheck_w4 correction inoculation confidence_2022_w3, robust
est store conf22fc_ldv

reg confidence_2022_w5_post prebunking_inoc##prebunking_no_inoc##factcheck_w4 correction inoculation, robust
est store conf22fc_noc

quietly lasso linear confidence_2022_w5_post college age3544 age4554 age5564 age65plus male midwest south west ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre targeted_false_w5_pre discernment_pre, rseed(1234)
local confidence_2022_w5_post_ctl=e(allvars_sel) 

reg confidence_2022_w5_post prebunking_inoc##prebunking_no_inoc##independent_w3##republican_w3 correction inoculation factcheck_w4 `confidence_2022_w5_post_ctl', robust
est store conf22party
lincom 1.prebunking_inoc-1.prebunking_no_inoc
lincom 1.prebunking_inoc#1.independent_w3-1.prebunking_no_inoc#1.independent_w3
lincom 1.prebunking_inoc#1.republican_w3-1.prebunking_no_inoc#1.republican_w3

reg confidence_2022_w5_post prebunking_inoc##prebunking_no_inoc##independent_w3##republican_w3 correction inoculation factcheck_w4 confidence_2022_w3, robust
est store conf22party_ldv

reg confidence_2022_w5_post prebunking_inoc##prebunking_no_inoc##independent_w3##republican_w3 correction inoculation factcheck_w4, robust
est store conf22party_noc

quietly lasso linear confidence_2022_w5_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre targeted_false_w5_pre discernment_pre, rseed(1234)
local confidence_2022_w5_post_ctl=e(allvars_sel) 

reg confidence_2022_w5_post prebunking_inoc##prebunking_no_inoc##i.trumpq correction inoculation factcheck_w4 `confidence_2022_w5_post_ctl', robust
est store conf22trump

reg confidence_2022_w5_post prebunking_inoc##prebunking_no_inoc##i.trumpq correction inoculation factcheck_w4 confidence_2022_w3, robust
est store conf22trump_ldv

reg confidence_2022_w5_post prebunking_inoc##prebunking_no_inoc##i.trumpq correction inoculation factcheck_w4, robust
est store conf22trump_noc

reg fraud2022w5_post prebunking_inoc##prebunking_no_inoc##inoculation##correction factcheck_w4 `fraud2022w5_post_ctl', robust
est store fraud22ic

reg fraud2022w5_post prebunking_inoc##prebunking_no_inoc##inoculation##correction factcheck_w4 fraud2020w3_pre, robust
est store fraud22ic_ldv

reg fraud2022w5_post prebunking_inoc##prebunking_no_inoc##inoculation##correction factcheck_w4, robust
est store fraud22ic_noc

reg fraud2022w5_post prebunking_inoc##prebunking_no_inoc##factcheck_w4 correction inoculation `fraud2022w5_post_ctl', robust
est store fraud22fc

reg fraud2022w5_post prebunking_inoc##prebunking_no_inoc##factcheck_w4 correction inoculation fraud2020w3_pre, robust
est store fraud22fc_ldv

reg fraud2022w5_post prebunking_inoc##prebunking_no_inoc##factcheck_w4 correction inoculation, robust
est store fraud22fc_noc

quietly lasso linear fraud2022w5_post college age3544 age4554 age5564 age65plus male midwest south west ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre targeted_false_w5_pre discernment_pre, rseed(1234)
local fraud2022w5_post_ctl=e(allvars_sel) 

reg fraud2022w5_post prebunking_inoc##prebunking_no_inoc##independent_w3##republican_w3 inoculation correction factcheck_w4 `fraud2022w5_post_ctl', robust
est store fraud22party
lincom 1.prebunking_inoc-1.prebunking_no_inoc
lincom 1.prebunking_inoc#1.independent_w3-1.prebunking_no_inoc#1.independent_w3
lincom 1.prebunking_inoc#1.republican_w3-1.prebunking_no_inoc#1.republican_w3

reg fraud2022w5_post prebunking_inoc##prebunking_no_inoc##independent_w3##republican_w3 inoculation correction factcheck_w4 fraud2020w3_pre, robust
est store fraud22party_ldv

reg fraud2022w5_post prebunking_inoc##prebunking_no_inoc##independent_w3##republican_w3 inoculation correction factcheck_w4, robust
est store fraud22party_noc

quietly lasso linear fraud2022w5_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre targeted_false_w5_pre discernment_pre, rseed(1234)
local fraud2022w5_post_ctl=e(allvars_sel) 

reg fraud2022w5_post prebunking_inoc##prebunking_no_inoc##i.trumpq correction inoculation factcheck_w4 `fraud2022w5_post_ctl', robust
est store fraud22trump

reg fraud2022w5_post prebunking_inoc##prebunking_no_inoc##i.trumpq correction inoculation factcheck_w4 fraud2020w3_pre, robust
est store fraud22trump_ldv

reg fraud2022w5_post prebunking_inoc##prebunking_no_inoc##i.trumpq correction inoculation factcheck_w4, robust
est store fraud22trump_noc

reg seats_won_fraud_2022_w5_post prebunking_inoc##prebunking_no_inoc##inoculation##correction factcheck_w4 `seats_won_fraud_22_w5_post_ctl', robust
est store seats22ic

reg seats_won_fraud_2022_w5_post prebunking_inoc##prebunking_no_inoc##inoculation##correction factcheck_w4 seats_won_fraud_2022_w3, robust
est store seats22ic_ldv

reg seats_won_fraud_2022_w5_post prebunking_inoc##prebunking_no_inoc##inoculation##correction factcheck_w4, robust
est store seats22ic_noc

reg seats_won_fraud_2022_w5_post prebunking_inoc##prebunking_no_inoc##factcheck_w4 correction inoculation `seats_won_fraud_22_w5_post_ctl', robust
est store seats22fc

reg seats_won_fraud_2022_w5_post prebunking_inoc##prebunking_no_inoc##factcheck_w4 correction inoculation seats_won_fraud_2022_w3, robust
est store seats22fc_ldv

reg seats_won_fraud_2022_w5_post prebunking_inoc##prebunking_no_inoc##factcheck_w4 correction inoculation, robust
est store seats22fc_noc

quietly lasso linear seats_won_fraud_2022_w5_post college age3544 age4554 age5564 age65plus male midwest south west ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre targeted_false_w5_pre discernment_pre, rseed(1234)
local seats_won_fraud_22_w5_post_ctl=e(allvars_sel) 

reg seats_won_fraud_2022_w5_post prebunking_inoc##prebunking_no_inoc##independent_w3##republican_w3 correction inoculation factcheck_w4 `seats_won_fraud_22_w5_post_ctl', robust
est store seats22party
lincom 1.prebunking_inoc-1.prebunking_no_inoc
lincom 1.prebunking_inoc#1.independent_w3-1.prebunking_no_inoc#1.independent_w3
lincom 1.prebunking_inoc#1.republican_w3-1.prebunking_no_inoc#1.republican_w3

reg seats_won_fraud_2022_w5_post prebunking_inoc##prebunking_no_inoc##independent_w3##republican_w3 correction inoculation factcheck_w4 seats_won_fraud_2022_w3, robust
est store seats22party_ldv

reg seats_won_fraud_2022_w5_post prebunking_inoc##prebunking_no_inoc##independent_w3##republican_w3 correction inoculation factcheck_w4, robust
est store seats22party_noc

quietly lasso linear seats_won_fraud_2022_w5_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre targeted_false_w5_pre discernment_pre, rseed(1234)
local seats_won_fraud_22_w5_post_ctl=e(allvars_sel) 

reg seats_won_fraud_2022_w5_post prebunking_inoc##prebunking_no_inoc##i.trumpq correction inoculation factcheck_w4 `seats_won_fraud_22_w5_post_ctl', robust
est store seats22trump

reg seats_won_fraud_2022_w5_post prebunking_inoc##prebunking_no_inoc##i.trumpq correction inoculation factcheck_w4 seats_won_fraud_2022_w3, robust
est store seats22trump_ldv

reg seats_won_fraud_2022_w5_post prebunking_inoc##prebunking_no_inoc##i.trumpq correction inoculation factcheck_w4, robust
est store seats22trump_noc

reg confidence_2024_w5_post prebunking_inoc##prebunking_no_inoc##inoculation##correction factcheck_w4 `confidence_2024_w5_post_ctl', robust
est store conf24ic

reg confidence_2024_w5_post prebunking_inoc##prebunking_no_inoc##inoculation##correction factcheck_w4 confidence_2022_w3, robust
est store conf24ic_ldv

reg confidence_2024_w5_post prebunking_inoc##prebunking_no_inoc##inoculation##correction factcheck_w4, robust
est store conf24ic_noc

reg confidence_2024_w5_post prebunking_inoc##prebunking_no_inoc##factcheck_w4 correction inoculation `confidence_2024_w5_post_ctl', robust
est store conf24fc

reg confidence_2024_w5_post prebunking_inoc##prebunking_no_inoc##factcheck_w4 correction inoculation confidence_2022_w3, robust
est store conf24fc_ldv

reg confidence_2024_w5_post prebunking_inoc##prebunking_no_inoc##factcheck_w4 correction inoculation, robust
est store conf24fc_noc

quietly lasso linear confidence_2024_w5_post college age3544 age4554 age5564 age65plus male midwest south west ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre targeted_false_w5_pre discernment_pre, rseed(1234)
local confidence_2024_w5_post_ctl=e(allvars_sel) 

reg confidence_2024_w5_post prebunking_inoc##prebunking_no_inoc##independent_w3##republican_w3 correction inoculation factcheck_w4 `confidence_2024_w5_post_ctl', robust
est store conf24party
lincom 1.prebunking_inoc-1.prebunking_no_inoc
lincom 1.prebunking_inoc#1.independent_w3-1.prebunking_no_inoc#1.independent_w3
lincom 1.prebunking_inoc#1.republican_w3-1.prebunking_no_inoc#1.republican_w3

reg confidence_2024_w5_post prebunking_inoc##prebunking_no_inoc##independent_w3##republican_w3 correction inoculation factcheck_w4 confidence_2022_w3, robust
est store conf24party_ldv

reg confidence_2024_w5_post prebunking_inoc##prebunking_no_inoc##independent_w3##republican_w3 correction inoculation factcheck_w4, robust
est store conf24party_noc

quietly lasso linear confidence_2024_w5_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre targeted_false_w5_pre discernment_pre, rseed(1234)
local confidence_2024_w5_post_ctl=e(allvars_sel) 

reg confidence_2024_w5_post prebunking_inoc##prebunking_no_inoc##i.trumpq correction inoculation factcheck_w4 `confidence_2024_w5_post_ctl', robust
est store conf24trump

reg confidence_2024_w5_post prebunking_inoc##prebunking_no_inoc##i.trumpq correction inoculation factcheck_w4 confidence_2022_w3, robust
est store conf24trump_ldv

reg confidence_2024_w5_post prebunking_inoc##prebunking_no_inoc##i.trumpq correction inoculation factcheck_w4, robust
est store conf24trump_noc

reg fraud2024w5_post prebunking_inoc##prebunking_no_inoc##inoculation##correction factcheck_w4 `fraud2024w5_post_ctl', robust
est store fraud24ic

reg fraud2024w5_post prebunking_inoc##prebunking_no_inoc##inoculation##correction factcheck_w4 fraud2020w3_pre, robust
est store fraud24ic_ldv

reg fraud2024w5_post prebunking_inoc##prebunking_no_inoc##inoculation##correction factcheck_w4, robust
est store fraud24ic_noc

reg fraud2024w5_post prebunking_inoc##prebunking_no_inoc##factcheck_w4 correction inoculation `fraud2024w5_post_ctl', robust
est store fraud24fc

reg fraud2024w5_post prebunking_inoc##prebunking_no_inoc##factcheck_w4 correction inoculation fraud2020w3_pre, robust
est store fraud24fc_ldv

reg fraud2024w5_post prebunking_inoc##prebunking_no_inoc##factcheck_w4 correction inoculation, robust
est store fraud24fc_noc

quietly lasso linear fraud2024w5_post college age3544 age4554 age5564 age65plus male midwest south west ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre targeted_false_w5_pre discernment_pre, rseed(1234)
local fraud2024w5_post_ctl=e(allvars_sel) 

reg fraud2024w5_post prebunking_inoc##prebunking_no_inoc##independent_w3##republican_w3 inoculation correction factcheck_w4 `fraud2024w5_post_ctl', robust
est store fraud24party
lincom 1.prebunking_inoc-1.prebunking_no_inoc
lincom 1.prebunking_inoc#1.independent_w3-1.prebunking_no_inoc#1.independent_w3
lincom 1.prebunking_inoc#1.republican_w3-1.prebunking_no_inoc#1.republican_w3

reg fraud2024w5_post prebunking_inoc##prebunking_no_inoc##independent_w3##republican_w3 inoculation correction factcheck_w4 fraud2020w3_pre, robust
est store fraud24party_ldv

reg fraud2024w5_post prebunking_inoc##prebunking_no_inoc##independent_w3##republican_w3 inoculation correction factcheck_w4, robust
est store fraud24party_noc

quietly lasso linear fraud2024w5_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre targeted_false_w5_pre discernment_pre, rseed(1234)
local fraud2024w5_post_ctl=e(allvars_sel) 

reg fraud2024w5_post prebunking_inoc##prebunking_no_inoc##i.trumpq correction inoculation factcheck_w4 `fraud2024w5_post_ctl', robust
est store fraud24trump

reg fraud2024w5_post prebunking_inoc##prebunking_no_inoc##i.trumpq correction inoculation factcheck_w4 fraud2020w3_pre, robust
est store fraud24trump_ldv

reg fraud2024w5_post prebunking_inoc##prebunking_no_inoc##i.trumpq correction inoculation factcheck_w4, robust
est store fraud24trump_noc

reg seats_won_fraud_2024_w5_post prebunking_inoc##prebunking_no_inoc##inoculation##correction factcheck_w4 `seats_won_fraud_24_w5_post_ctl', robust
est store seats24ic

reg seats_won_fraud_2024_w5_post prebunking_inoc##prebunking_no_inoc##inoculation##correction factcheck_w4 seats_won_fraud_2022_w3, robust
est store seats24ic_ldv

reg seats_won_fraud_2024_w5_post prebunking_inoc##prebunking_no_inoc##inoculation##correction factcheck_w4, robust
est store seats24ic_noc

reg seats_won_fraud_2024_w5_post prebunking_inoc##prebunking_no_inoc##factcheck_w4 correction inoculation `seats_won_fraud_24_w5_post_ctl', robust
est store seats24fc

reg seats_won_fraud_2024_w5_post prebunking_inoc##prebunking_no_inoc##factcheck_w4 correction inoculation seats_won_fraud_2022_w3, robust
est store seats24fc_ldv

reg seats_won_fraud_2024_w5_post prebunking_inoc##prebunking_no_inoc##factcheck_w4 correction inoculation, robust
est store seats24fc_noc

quietly lasso linear seats_won_fraud_2024_w5_post college age3544 age4554 age5564 age65plus male midwest south west ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre targeted_false_w5_pre discernment_pre, rseed(1234)
local seats_won_fraud_24_w5_post_ctl=e(allvars_sel) 

reg seats_won_fraud_2024_w5_post prebunking_inoc##prebunking_no_inoc##independent_w3##republican_w3 correction inoculation factcheck_w4 `seats_won_fraud_24_w5_post_ctl', robust
est store seats24party
lincom 1.prebunking_inoc-1.prebunking_no_inoc
lincom 1.prebunking_inoc#1.independent_w3-1.prebunking_no_inoc#1.independent_w3
lincom 1.prebunking_inoc#1.republican_w3-1.prebunking_no_inoc#1.republican_w3

reg seats_won_fraud_2024_w5_post prebunking_inoc##prebunking_no_inoc##independent_w3##republican_w3 correction inoculation factcheck_w4 seats_won_fraud_2022_w3, robust
est store seats24party_ldv

reg seats_won_fraud_2024_w5_post prebunking_inoc##prebunking_no_inoc##independent_w3##republican_w3 correction inoculation factcheck_w4, robust
est store seats24party_noc

quietly lasso linear seats_won_fraud_2024_w5_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre targeted_false_w5_pre discernment_pre, rseed(1234)
local seats_won_fraud_24_w5_post_ctl=e(allvars_sel) 

reg seats_won_fraud_2024_w5_post prebunking_inoc##prebunking_no_inoc##i.trumpq correction inoculation factcheck_w4 `seats_won_fraud_24_w5_post_ctl', robust
est store seats24trump

reg seats_won_fraud_2024_w5_post prebunking_inoc##prebunking_no_inoc##i.trumpq correction inoculation factcheck_w4 seats_won_fraud_2022_w3, robust
est store seats24trump_ldv

reg seats_won_fraud_2024_w5_post prebunking_inoc##prebunking_no_inoc##i.trumpq correction inoculation factcheck_w4, robust
est store seats24trump_noc

*beliefs

reg targeted_true_w5_post prebunking_inoc##prebunking_no_inoc##inoculation##correction `targeted_true_w5_post_ctl', robust
est store trueic

reg targeted_true_w5_post prebunking_inoc##prebunking_no_inoc##inoculation##correction targeted_true_w5_pre, robust
est store trueic_ldv

reg targeted_true_w5_post prebunking_inoc##prebunking_no_inoc##inoculation##correction, robust
est store trueic_noc

reg targeted_true_w5_post prebunking_inoc##prebunking_no_inoc##factcheck_w4 correction inoculation `targeted_true_w5_post_ctl', robust
est store truefc

reg targeted_true_w5_post prebunking_inoc##prebunking_no_inoc##factcheck_w4 correction inoculation targeted_true_w5_pre, robust
est store truefc_ldv

reg targeted_true_w5_post prebunking_inoc##prebunking_no_inoc##factcheck_w4 correction inoculation, robust
est store truefc_noc

quietly lasso linear targeted_true_w5_post college age3544 age4554 age5564 age65plus male midwest south west ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre targeted_false_w5_pre discernment_pre, rseed(1234)
local targeted_true_w5_post_ctl=e(allvars_sel) 

reg targeted_true_w5_post prebunking_inoc##prebunking_no_inoc##independent_w3##republican_w3 inoculation correction factcheck_w4 `targeted_true_w5_post_ctl', robust
est store trueparty
lincom 1.prebunking_inoc-1.prebunking_no_inoc
lincom 1.prebunking_inoc#1.independent_w3-1.prebunking_no_inoc#1.independent_w3
lincom 1.prebunking_inoc#1.republican_w3-1.prebunking_no_inoc#1.republican_w3
margins, expression(_b[1.prebunking_inoc]) post
est sto trueinocdem

reg targeted_true_w5_post prebunking_inoc##prebunking_no_inoc##independent_w3##republican_w3 inoculation correction factcheck_w4 targeted_true_w5_pre, robust
est store trueparty_ldv

reg targeted_true_w5_post prebunking_inoc##prebunking_no_inoc##independent_w3##republican_w3 inoculation correction factcheck_w4, robust
est store trueparty_noc

quietly lasso linear targeted_true_w5_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre targeted_false_w5_pre discernment_pre, rseed(1234)
local targeted_true_w5_post_ctl=e(allvars_sel) 

reg targeted_true_w5_post prebunking_inoc##prebunking_no_inoc##i.trumpq correction inoculation factcheck_w4 `targeted_true_w5_post_ctl', robust
est store truetrump

reg targeted_true_w5_post prebunking_inoc##prebunking_no_inoc##i.trumpq correction inoculation factcheck_w4 targeted_true_w5_pre, robust
est store truetrump_ldv

reg targeted_true_w5_post prebunking_inoc##prebunking_no_inoc##i.trumpq correction inoculation factcheck_w4, robust
est store truetrump_noc

reg targeted_false_w5_post prebunking_inoc##prebunking_no_inoc##inoculation##correction `targeted_false_w5_post_ctl', robust
est store falseic

reg targeted_false_w5_post prebunking_inoc##prebunking_no_inoc##inoculation##correction targeted_false_w5_pre, robust
est store falseic_ldv

reg targeted_false_w5_post prebunking_inoc##prebunking_no_inoc##inoculation##correction, robust
est store falseic_noc

reg targeted_false_w5_post prebunking_inoc##prebunking_no_inoc##factcheck_w4 correction inoculation `targeted_false_w5_post_ctl', robust
est store falsefc

reg targeted_false_w5_post prebunking_inoc##prebunking_no_inoc##factcheck_w4 correction inoculation targeted_false_w5_pre, robust
est store falsefc_ldv

reg targeted_false_w5_post prebunking_inoc##prebunking_no_inoc##factcheck_w4 correction inoculation, robust
est store falsefc_noc

quietly lasso linear targeted_false_w5_post college age3544 age4554 age5564 age65plus male midwest south west ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre targeted_false_w5_pre discernment_pre, rseed(1234)
local targeted_false_w5_post_ctl=e(allvars_sel) 

reg targeted_false_w5_post prebunking_inoc##prebunking_no_inoc##independent_w3##republican_w3 inoculation correction factcheck_w4 `targeted_false_w5_post_ctl', robust
est store falseparty
lincom 1.prebunking_inoc-1.prebunking_no_inoc
lincom 1.prebunking_inoc#1.independent_w3-1.prebunking_no_inoc#1.independent_w3
lincom 1.prebunking_inoc#1.republican_w3-1.prebunking_no_inoc#1.republican_w3

reg targeted_false_w5_post prebunking_inoc##prebunking_no_inoc##independent_w3##republican_w3 inoculation correction factcheck_w4 targeted_false_w5_pre, robust
est store falseparty_ldv

reg targeted_false_w5_post prebunking_inoc##prebunking_no_inoc##independent_w3##republican_w3 inoculation correction factcheck_w4, robust
est store falseparty_noc

quietly lasso linear targeted_false_w5_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre targeted_false_w5_pre discernment_pre, rseed(1234)
local targeted_false_w5_post_ctl=e(allvars_sel) 

reg targeted_false_w5_post prebunking_inoc##prebunking_no_inoc##i.trumpq correction inoculation factcheck_w4 `targeted_false_w5_post_ctl', robust
est store falsetrump
lincom 1.prebunking_inoc-1.prebunking_no_inoc
lincom 1.prebunking_inoc#3.trumpq-1.prebunking_no_inoc#3.trumpq
lincom 1.prebunking_inoc#2.trumpq-1.prebunking_no_inoc#2.trumpq

reg targeted_false_w5_post prebunking_inoc##prebunking_no_inoc##i.trumpq correction inoculation factcheck_w4 targeted_false_w5_pre, robust
est store falsetrump_ldv

reg targeted_false_w5_post prebunking_inoc##prebunking_no_inoc##i.trumpq correction inoculation factcheck_w4, robust
est store falsetrump_noc

reg discernment prebunking_inoc##prebunking_no_inoc##inoculation##correction `discernment_ctl', robust
est store discernic

reg discernment prebunking_inoc##prebunking_no_inoc##inoculation##correction discernment_pre, robust
est store discernic_ldv

reg discernment prebunking_inoc##prebunking_no_inoc##inoculation##correction, robust
est store discernic_noc

reg discernment prebunking_inoc##prebunking_no_inoc##factcheck_w4 correction inoculation `discernment_ctl', robust
est store discernfc

reg discernment prebunking_inoc##prebunking_no_inoc##factcheck_w4 correction inoculation discernment_pre, robust
est store discernfc_ldv

reg discernment prebunking_inoc##prebunking_no_inoc##factcheck_w4 correction inoculation, robust
est store discernfc_noc

quietly lasso linear discernment college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre targeted_false_w5_pre discernment_pre, rseed(1234)
local discernment_ctl=e(allvars_sel) 

reg discernment prebunking_inoc##prebunking_no_inoc##independent_w3##republican_w3 inoculation correction factcheck_w4 `discernment_ctl', robust
est store discernparty
lincom 1.prebunking_inoc-1.prebunking_no_inoc
lincom 1.prebunking_inoc#1.independent_w3-1.prebunking_no_inoc#1.independent_w3
lincom 1.prebunking_inoc#1.republican_w3-1.prebunking_no_inoc#1.republican_w3

reg discernment prebunking_inoc##prebunking_no_inoc##independent_w3##republican_w3 inoculation correction factcheck_w4 discernment_pre, robust
est store discernparty_ldv

reg discernment prebunking_inoc##prebunking_no_inoc##independent_w3##republican_w3 inoculation correction factcheck_w4, robust
est store discernparty_noc

quietly lasso linear discernment college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre targeted_false_w5_pre discernment_pre, rseed(1234)
local discernment_ctl=e(allvars_sel) 

reg discernment prebunking_inoc##prebunking_no_inoc##i.trumpq correction inoculation factcheck_w4 `discernment_ctl', robust
est store discerntrump
lincom 1.prebunking_inoc-1.prebunking_no_inoc
lincom 1.prebunking_inoc#3.trumpq-1.prebunking_no_inoc#3.trumpq
lincom 1.prebunking_inoc#2.trumpq-1.prebunking_no_inoc#2.trumpq

reg discernment prebunking_inoc##prebunking_no_inoc##i.trumpq correction inoculation factcheck_w4 discernment_pre, robust
est store discerntrump_ldv

reg discernment prebunking_inoc##prebunking_no_inoc##i.trumpq correction inoculation factcheck_w4, robust
est store discerntrump_noc

*-pre-treatment measure of outcome (where available)

capture drop conf22quintile
xtile conf22quintile=confidence_2022_w5, nq(5)  /*to force three groups*/
tab conf22quintile 

quietly lasso linear confidence_2022_w5_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre targeted_false_w5_pre discernment_pre, rseed(1234)
local confidence_2022_w5_post_ctl=e(allvars_sel) 

reg confidence_2022_w5_post prebunking_inoc##prebunking_no_inoc##ib3.conf22quintile `confidence_2022_w5_post_ctl', robust
est store conf22dv

reg confidence_2022_w5_post prebunking_inoc##prebunking_no_inoc##ib3.conf22quintile, robust
est store conf22dv_noc

capture drop fraud2022quintile
xtile fraud2022quintile=fraud2022w5_pre, nq(3)
tab fraud2022quintile

quietly lasso linear fraud2022w5_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre targeted_false_w5_pre discernment_pre, rseed(1234)
local fraud2022w5_post_ctl=e(allvars_sel) 

reg fraud2022w5_post prebunking_inoc##prebunking_no_inoc##fraud2022quintile `fraud2022w5_post_ctl', robust
est store fraud22dv

reg fraud2022w5_post prebunking_inoc##prebunking_no_inoc##fraud2022quintile, robust
est store fraud22dv_noc

capture drop seats2022quintile
xtile seats2022quintile=seats_won_fraud_2022_w5, nq(3)
tab seats2022quintile

quietly lasso linear seats_won_fraud_2022_w5_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre targeted_false_w5_pre discernment_pre, rseed(1234)
local seats_won_fraud_22_w5_post_ctl=e(allvars_sel) 

reg seats_won_fraud_2022_w5_post prebunking_inoc##prebunking_no_inoc##seats2022quintile `seats_won_fraud_22_w5_post_ctl', robust
est store seats22dv

reg seats_won_fraud_2022_w5_post prebunking_inoc##prebunking_no_inoc##seats2022quintile, robust
est store seats22dv_noc

capture drop conf24quintile
xtile conf24quintile=confidence_2024_w5, nq(4) /*to force three groups*/
tab conf24quintile

quietly lasso linear confidence_2024_w5_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre targeted_false_w5_pre discernment_pre, rseed(1234)
local confidence_2024_w5_post_ctl=e(allvars_sel) 

reg confidence_2024_w5_post prebunking_inoc##prebunking_no_inoc##ib3.conf24quintile `confidence_2024_w5_post_ctl', robust
est store conf24dv

reg confidence_2024_w5_post prebunking_inoc##prebunking_no_inoc##ib3.conf24quintile, robust
est store conf24dv_noc

capture drop fraud24quintile
xtile fraud24quintile=fraud2024w5_pre, nq(3)
tab fraud24quintile

quietly lasso linear fraud2024w5_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre targeted_false_w5_pre discernment_pre, rseed(1234)
local fraud2024w5_post_ctl=e(allvars_sel) 

reg fraud2024w5_post prebunking_inoc##prebunking_no_inoc##fraud24quintile `fraud2024w5_post_ctl', robust
est store fraud24dv

reg fraud2024w5_post prebunking_inoc##prebunking_no_inoc##fraud24quintile, robust
est store fraud24dv_noc

capture drop seats24quintile
xtile seats24quintile=seats_won_fraud_2024_w5, nq(3)
tab seats24quintile

quietly lasso linear seats_won_fraud_2024_w5_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre targeted_false_w5_pre discernment_pre, rseed(1234)
local seats_won_fraud_24_w5_post_ctl=e(allvars_sel) 

reg seats_won_fraud_2024_w5_post prebunking_inoc##prebunking_no_inoc##seats24quintile `seats_won_fraud_24_w5_post_ctl', robust
est store seats24dv

reg seats_won_fraud_2024_w5_post prebunking_inoc##prebunking_no_inoc##seats24quintile, robust
est store seats24dv_noc

*gen discernment_pre=targeted_true_w5_pre-targeted_false_w5_pre

capture drop trueterc
xtile trueterc=targeted_true_w5_pre, nq(3)
tab trueterc

capture drop falseterc
xtile falseterc=targeted_false_w5_pre, nq(3)
tab falseterc

capture drop discernterc
xtile discernterc=discernment_pre, nq(3)
tab discernterc

reg targeted_true_w5_post prebunking_inoc##prebunking_no_inoc##ib3.trueterc `targeted_true_w5_post_ctl', robust
est store truedv

reg targeted_true_w5_post prebunking_inoc##prebunking_no_inoc##ib3.trueterc, robust
est store truedv_noc

quietly lasso linear targeted_false_w5_post college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre discernment_pre, rseed(1234)
local targeted_false_w5_post_ctl=e(allvars_sel) 

reg targeted_false_w5_post prebunking_inoc##prebunking_no_inoc##falseterc `targeted_false_w5_post_ctl', robust
est store falsedv
lincom 1.prebunking_inoc-1.prebunking_no_inoc
lincom 1.prebunking_inoc#2.falseterc-1.prebunking_no_inoc#2.falseterc
lincom 1.prebunking_inoc#3.falseterc-1.prebunking_no_inoc#3.falseterc

reg targeted_false_w5_post prebunking_inoc##prebunking_no_inoc##falseterc, robust
est store falsedv_noc

quietly lasso linear discernment college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre targeted_false_w5_pre, rseed(1234)
local discernment_ctl=e(allvars_sel) 

quietly lasso linear discernment college age3544 age4554 age5564 age65plus male midwest south west pid3_recode_w3 ideo5 conspiracy knowledge nonwhite polinterest mediatrust biden_rwin_w3 seats_won_fraud_2020_w3 seats_won_fraud_2022_w3 fraud2020w3_pre confidence_2020_w3 confidence_2022_w3 bidentherm trumptherm demtherm reptherm mediatherm electionofficialtherm whitetherm blacktherm targeted_true_w5_pre targeted_false_w5_pre, rseed(1234)
local discernment_ctl=e(allvars_sel) 

reg discernment prebunking_inoc##prebunking_no_inoc##ib3.discernterc `discernment_ctl', robust
est store discerndv
lincom 1.prebunking_inoc-1.prebunking_no_inoc
lincom 1.prebunking_inoc#2.discernterc-1.prebunking_no_inoc#2.discernterc
lincom 1.prebunking_inoc#1.discernterc-1.prebunking_no_inoc#1.discernterc

reg discernment prebunking_inoc##prebunking_no_inoc##ib3.discernterc, robust
est store discerndv_noc

*moderator distributions w3
tab independent_w3 republican_w3
tab trumpq
tab conf22quintile
tab fraud2022quintile
tab seats2022quintile
tab conf24quintile
tab fraud24quintile
tab seats24quintile
tab trueterc
tab falseterc
tab discernterc

*output HTE tables

estout conf22party conf24party fraud22party fraud24party seats22party seats24party using "wave5HTEsparty.tex", label style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** .005) 

estout conf22party conf22party_ldv conf22party_noc conf24party conf24party_ldv conf24party_noc using "wave5HTEsparty1.tex", label style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** .005) 

estout fraud22party fraud22party_ldv fraud22party_noc fraud24party fraud24party_ldv fraud24party_noc seats22party seats22party_ldv seats22party_noc seats24party seats24party_ldv seats24party_noc using "wave5HTEsparty2.tex", label style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** .005) 

estout conf22trump conf24trump fraud22trump fraud24trump seats22trump seats24trump using "wave5HTEstrump.tex", label style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** .005)
 
estout conf22trump conf22trump_ldv conf22trump_noc conf24trump conf24trump_ldv conf24trump_noc using "wave5HTEstrump1.tex", label style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** .005)
 
estout fraud22trump fraud22trump_ldv fraud22trump_noc fraud24trump fraud24trump_ldv fraud24trump_noc seats22trump seats22trump_ldv seats22trump_noc seats24trump seats24trump_ldv seats24trump_noc using "wave5HTEstrump2.tex", label style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** .005)
 
estout conf22dv conf24dv fraud22dv fraud24dv seats22dv seats24dv using "wave5HTEsdv.tex", label style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** .005) 

estout conf22dv conf22dv_noc conf24dv conf24dv_noc fraud22dv fraud22dv_noc fraud24dv fraud24dv_noc seats22dv seats22dv_noc seats24dv seats24dv_noc using "wave5HTEsdv1.tex", label style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** .005) 

estout conf22ic conf24ic fraud22ic fraud24ic seats22ic seats24ic using "wave5HTEsic.tex", label style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** .005) 

estout conf22ic conf22ic_ldv conf22ic_noc conf24ic conf24ic_ldv conf24ic_noc using "wave5HTEsic1.tex", label style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** .005) 

estout fraud22ic fraud22ic_ldv fraud22ic_noc fraud24ic fraud24ic_ldv fraud24ic_noc seats22ic seats22ic_ldv seats22ic_noc seats24ic seats24ic_ldv seats24ic_noc using "wave5HTEsic2.tex", label style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** .005) 

estout conf22fc conf24fc fraud22fc fraud24fc seats22fc seats24fc using "wave5HTEsfc.tex", label style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** .005) 

estout conf22fc conf22fc_ldv conf22fc_noc conf24fc conf24fc_ldv conf24fc_noc using "wave5HTEsfc1.tex", label style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** .005) 

estout fraud22fc fraud22fc_ldv fraud22fc_noc fraud24fc fraud24fc_ldv fraud24fc_noc seats22fc seats22fc_ldv seats22fc_noc seats24fc seats24fc_ldv seats24fc_noc using "wave5HTEsfc2.tex", label style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** .005) 

estout trueparty falseparty discernparty using "wave5beliefsHTEsparty.tex", label style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** .005) 

estout trueparty trueparty_ldv trueparty_noc falseparty falseparty_ldv falseparty_noc discernparty discernparty_ldv discernparty_noc using "wave5beliefsHTEsparty1.tex", label style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** .005) 

estout truetrump falsetrump discerntrump using "wave5beliefsHTEstrump.tex", label style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** .005)

estout truetrump truetrump_ldv truetrump_noc falsetrump falsetrump_ldv falsetrump_noc discerntrump discerntrump_ldv discerntrump_noc using "wave5beliefsHTEstrump1.tex", label style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** .005) 

estout truedv falsedv discerndv using "wave5beliefsHTEsdv.tex", label style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** .005) 

estout truedv truedv_noc falsedv falsedv_noc discerndv discerndv_noc using "wave5beliefsHTEsdv1.tex", label style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** .005) 

estout trueic falseic discernic using "wave5beliefsHTEsic.tex", label style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** .005) 

estout trueic trueic_ldv trueic_noc falseic falseic_ldv falseic_noc discernic discernic_ldv discernic_noc using "wave5beliefsHTEsic1.tex", label style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** .005) 

estout truefc falsefc discernfc using "wave5beliefsHTEsfc.tex", label style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** .005) 

estout truefc truefc_ldv truefc_noc falsefc falsefc_ldv falsefc_noc discernfc discernfc_ldv discernfc_noc using "wave5beliefsHTEsfc1.tex", label style(tex) replace varwidth(25) collabels("") cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) stats(N, fmt(%9.0f) labels("N")) starlevels(* 0.05 ** 0.01 *** .005) 

*mean confidence

mean confidence_2022_w5_post if prebunking_no_inoc==0 & prebunking_inoc==0
mean confidence_2024_w5_post if prebunking_no_inoc==0 & prebunking_inoc==0

*substantive effects

gen binary_confidence_2022_w5=(confidence_2022_w5>2.5 & confidence_2022_w5!=.)
gen binary_confidence_2024_w5=(confidence_2024_w5>2.5 & confidence_2024_w5!=.)
gen binary_confidence_2022_w5_post=(confidence_2022_w5_post>2.5 & confidence_2022_w5_post!=.)
gen binary_confidence_2024_w5_post=(confidence_2024_w5_post>2.5 & confidence_2024_w5_post!=.)
gen binary_targeted_false_w5_pre=(targeted_false_w5_pre>2.5 & targeted_false_w5_pre!=.)
gen binary_targeted_false_w5_post=(targeted_false_w5_post>2.5 & targeted_false_w5_post!=.)

bysort prebunking_no_inoc prebunking_inoc: tab binary_confidence_2022_w5_post
bysort prebunking_no_inoc prebunking_inoc: tab binary_confidence_2024_w5_post
bysort prebunking_no_inoc prebunking_inoc: tab binary_targeted_false_w5_post

bysort gop prebunking_no_inoc prebunking_inoc: tab binary_confidence_2022_w5_post
bysort gop prebunking_no_inoc prebunking_inoc: tab binary_confidence_2024_w5_post
bysort gop prebunking_no_inoc prebunking_inoc: tab binary_targeted_false_w5_post

bysort binary_confidence_2022_w5 prebunking_no_inoc prebunking_inoc: tab binary_confidence_2022_w5_post, missing
bysort binary_confidence_2024_w5 prebunking_no_inoc prebunking_inoc: tab binary_confidence_2024_w5_post, missing
bysort binary_targeted_false_w5_pre prebunking_no_inoc prebunking_inoc: tab binary_targeted_false_w5_post, missing

gen both_confident=(binary_confidence_2022_w5_post==1 & binary_confidence_2024_w5_post==1)
bysort prebunking_no_inoc prebunking_inoc: tab both_confident
